IPB

Welcome Guest ( Log In | Register )

> RCBot2_075_R2 DS crash, When client connects and disconnects
Root
post Jul 20 2013, 07:22 PM
Post #1


Member
**

Group: Members
Posts: 24
Joined: 20-July 13
Member No.: 2,291



Hello all!
I've got a few problems with running bots on a dedicated server.
Server is crashing when client connects after bots have been added, and same is happening when player disconnects.
Previously server crashed when only one bot was added. I figured out a problem - that was wrong
PlayerRunCmd offset (was 416, but after recent update it has changed to 417).

There are no working bots for Day of Defeat: Source at this moment, and this bots looks really cool! Those are way better than many people laugh.gif
I would also request a ZombieMod support, but its not really necessary.

Here is a stack traces (with a dumps) when player connected and disconnected respectivitely.

P.S. Keep up good work, Cheeseh! I really appeciate it alot!
P.P.S. I am also a developer, but I am making SourceMod plugins for DoD:S. And your project is just awesome. GJ happy.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
darkranger
post Jul 29 2013, 12:13 PM
Post #2


Advanced Member
***

Group: Members
Posts: 51
Joined: 3-February 13
From: Austria
Member No.: 2,254



QUOTE(Root @ Jul 24 2013, 08:41 PM) *

EDIT 2:
Seems like its happening on only 3xi_trainmap, on each other I dont have that problem (darkranger can you confirm?)


NO, can not confirm that. had some crashes Before (2 weeks or so) with sourcemod. but after updating to latest version no crashes since there!

but there are not much players on my Gungame TDM server, so i can not really 100% say that all is correct!
LINK TO MY HL STATS
(server is only up from 16CET to 06 CET!)

i have reworked this little script that changes map if server is empty or last player leaves the server:
CODE
#include <sourcemod>
new Handle:timer = INVALID_HANDLE
new Handle:map_idle_time
new status
new Handle:g_nextmap

public Plugin:myinfo =
{
name = "Auto change map for RC BOTS",
    author = "Mleczam, modified from Darkranger",
    description = "Change the map if last Player Leaves the Server ( for RC BOTS)",
    version = "1.5DODS",
    url = "http://dark.asmodis.at/"
}

public OnPluginStart()
{
    map_idle_time = CreateConVar("sm_autochangemap_rc_bots_idlechange","5","When last Player leaves after this time server changes the map", FCVAR_PLUGIN)
    status = 0
}

public OnMapStart()
{
    timer = CreateTimer(240.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE)
    status = 0
}


public OnClientDisconnect(client)
{
    timer = CreateTimer(5.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE)
    status = 0
}

public Action:sprawdz(Handle:Timer)
{
    new ccount
    new NOfClients = GetClientCount(true)
    LogMessage("Autochangemap CHECK!")
    for (new i = 1; i <= NOfClients; i++)
    if (IsClientInGame(i) && !IsFakeClient(i))
    {
        ccount++
    }
    if( ccount > 0 || status)
    return Plugin_Handled
    KillTimer(timer)
    timer = INVALID_HANDLE
    timer = CreateTimer(GetConVarFloat(map_idle_time), sprawdz2)
    return Plugin_Handled
}

public Action:sprawdz2(Handle:Timer)
{
    new ccount;
    new NOfClients = GetClientCount(true)
    KillTimer(timer)
    for (new i = 1; i <= NOfClients; i++)
    if (IsClientInGame(i) && !IsFakeClient(i))
    {
        ccount++;
    }
    if( ccount > 0 )
    {
        timer = INVALID_HANDLE;
        timer = CreateTimer(5.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE)
        return Plugin_Handled
    }
    else
    {
        g_nextmap = FindConVar("sm_nextmap")
        decl String:snextmap[32];
        GetConVarString(g_nextmap, snextmap, sizeof(snextmap))
        ServerCommand("changelevel %s",snextmap)
        LogMessage("Autochangemap Change Map to %s", snextmap)
        status = 1
    }
    return Plugin_Handled
}


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Jul 29 2013, 01:59 PM
Post #3


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



I don't think rcbot2 will work well with sourcemod cos it has to hook the PlayerRunCmd function and so does sourcemod, so there are bound to be problems
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
Root   RCBot2_075_R2 DS crash   Jul 20 2013, 07:22 PM
genmac   Welcome to the forum Root! Btw he's the a...   Jul 21 2013, 02:53 AM
Root   Welcome to the forum Root! Btw he's the ...   Jul 22 2013, 09:27 AM
genmac   You're welcome! 3xi_trainmap is already w...   Jul 22 2013, 10:28 AM
darkranger   Hi Root :) RCBOTS running fine on my Windows DS G...   Jul 22 2013, 12:57 PM
madmax2   Hey Root, Welcome... Looks like you have made qui...   Jul 22 2013, 09:03 PM
Root   Hi Darky! Are you running latest version? Anyw...   Jul 23 2013, 08:25 AM
darkranger   Hi Darky! Are you running latest version? Any...   Jul 23 2013, 05:23 PM
Root   when last human player leaves the server thebots ...   Jul 23 2013, 06:14 PM
genmac   Check this thread...there's a request of some ...   Jul 23 2013, 11:38 AM
Root   Check this thread...there's a request of some...   Jul 23 2013, 11:55 AM
madmax2   Done! Wow, that was fast... There will be so...   Jul 23 2013, 07:05 PM
darkranger   the problem is that the bots automatically leaves ...   Jul 24 2013, 03:29 PM
Root   the problem is that the bots automatically leaves...   Jul 24 2013, 08:41 PM
darkranger   EDIT 2: Seems like its happening on only 3xi_trai...   Jul 29 2013, 12:13 PM
Cheeseh   I don't think rcbot2 will work well with sourc...   Jul 29 2013, 01:59 PM
botskiller16   Hello all, i am new here, and i have one question....   Aug 4 2013, 11:09 AM
darkranger   Hello all, i am new here, and i have one question...   Aug 4 2013, 01:19 PM
botskiller16   it works, but i think you need a WINDOWS root ser...   Aug 4 2013, 04:23 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th June 2025 - 07:28 PM