Server stops when player is kicked -
martoivanov - 13.08.2018
Hello,
I have a problem with my server. Sometimes when a player is kicked(for commands spam, chat spam, ping kick, not accepting the rules dialog, etc) the server stops. I have no idea why this is happening.
For example a few minutes ago one of the admins wrote /banacc which bans the player account.
Log:
Code:
[23:25:35] [cmd][Steels]: /banacc 34 smqna
[23:25:35] ADMIN: [ 23:25:35 ] Акаунтът с никнейм [WB][NK]meNdarkK[pS] беше баннат от Администратор Steels. [Причина: smqna]
[23:25:35] [debug] Server crashed while executing bgmod.amx
[23:25:35] [debug] AMX backtrace:
[23:25:35] [debug] #0 00000029 in ?? () at <unknown file>:0
[23:25:35] [debug] #1 00000029 in public OnPlayerDisconnect () at <unknown file>:0
[23:25:35] [debug] #2 native Kick () from samp03svr
[23:25:35] [debug] #3 0025fd08 in dcmd_banacc (playerid=10, params[]=@018be9d4 "34 smqna") at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:20258
[23:25:35] [debug] #4 002a94f0 in public OnPlayerCommandText (playerid=10, cmdtext[]=@018be9b4 "/banacc 34 smqna") at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:24274
and the line from the gamemode is :
Here is the whole command:
Code:
dcmd_banacc(playerid, params[])
{
new targetid, reason[36];
new string2[128];
if(sscanf(params, "us[36]", targetid, reason)) return SendClientMessage(playerid, COLOR_YELLOW, "Използвай: /banacc [Playerid/PartOfName] [reason]");
if (pInfo[playerid][Adminlevel] > 4 && pInfo[playerid][Adminlevel] <=7)
{
if(IsPlayerConnected(targetid))
{
if(targetid != INVALID_PLAYER_ID && targetid != playerid)
{
if(pInfo[targetid][Adminlevel] >=5)
{
SendClientMessage(playerid, COLOR_RED, "Не можеш да банваш играчи с такива права!");
return 1;
}
pInfo[targetid][Banned] = 1;
new h,m,s;
gettime(h,m,s);
format(string2, sizeof(string2), "ADMIN: [ %d:%d:%d ] Акаунтът с никнейм %s беше баннат от Администратор %s. [Причина: %s]",h,m,s,PlayerName(targetid),PlayerName(playerid),reason);
SendClientMessageToAll(COLOR_RED, string2);
//BanEx(targetid, reason);
printf("%s", string2);
Kick(targetid);
return 1;
}
}
else
{
format(string2, sizeof(string2), "Няма такъв играч!");
SendClientMessage(playerid, COLOR_RED, string2);
}
}
return 1;
}
Please, I will really appreciate if someone helps me!
Thanks in advance!
Re: Server stops when player is kicked -
martoivanov - 16.08.2018
Someone please?
Re: Server stops when player is kicked -
jlalt - 16.08.2018
One question, do you disbale class selection when player joins using toggleplayerspectating?
Re: Server stops when player is kicked -
martoivanov - 18.08.2018
No, I don't.
Before I used it, but now - no.
Re: Server stops when player is kicked -
KinderClans - 18.08.2018
Instead of using Kick(playerid),try this and see what happens:
pawn Code:
forward _KickPlayerDelayed(playerid)
public _KickPlayerDelayed(playerid)
{
Kick(playerid);
return 1;
}
DelayedKick(playerid, time = 500)
{
SetTimerEx("_KickPlayerDelayed", time, false, "d", playerid);
return 1;
}
Replace Kick(playerid); with:
Re: Server stops when player is kicked -
martoivanov - 20.08.2018
It doesn't help. The problem is still here. It stopped a minute ago.
Code:
[12:44:40] [debug] Server crashed while executing bgmod.amx
[12:44:40] [debug] AMX backtrace:
[12:44:40] [debug] #0 00000029 in ?? () at <unknown file>:0
[12:44:40] [debug] #1 00000029 in public OnPlayerDisconnect () at <unknown file>:0
[12:44:40] [debug] #2 native Kick () from samp03svr
[12:44:40] [debug] #3 00385070 in public _KickPlayerDelayed (playerid=11) at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:42143
Re: Server stops when player is kicked -
Sew_Sumi - 20.08.2018
You know, if you're going to use something, you should read the instructions first...
You need to compile with -d3 for crashdetect to return more detailed information.
Re: Server stops when player is kicked -
martoivanov - 20.08.2018
I already made this! I am compiling with -d3 written in pawn.cfg in the pawn folder.