Server stops when player is kicked
#1

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 :
Code:
Kick(playerid);
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!
Reply


Messages In This Thread
Server stops when player is kicked - by martoivanov - 13.08.2018, 20:40
Re: Server stops when player is kicked - by martoivanov - 16.08.2018, 09:19
Re: Server stops when player is kicked - by jlalt - 16.08.2018, 17:13
Re: Server stops when player is kicked - by martoivanov - 18.08.2018, 06:13
Re: Server stops when player is kicked - by KinderClans - 18.08.2018, 09:33
Re: Server stops when player is kicked - by martoivanov - 20.08.2018, 10:11
Re: Server stops when player is kicked - by Sew_Sumi - 20.08.2018, 10:22
Re: Server stops when player is kicked - by martoivanov - 20.08.2018, 10:29

Forum Jump:


Users browsing this thread: 2 Guest(s)