0.3x kick bugged?
#1

Hello, ever since I upgraded my server to 0.3x, whenever a player gets kicked, it just says "server closed the connection" an it doesn't give the reason. It worked fine in 0.3e and I haven't changed anything...
Here is the /kick command. please help me fix this so players are able to see the reason why that were kicked.

Quote:

{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");

if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && (PlayerInfo[giveplayerid][pHelper] >= 2 || PlayerInfo[giveplayerid][pAdmin] > 0) && playerid != giveplayerid)
{
format(string, sizeof(string), "AdmCmd: %s has been auto-kicked, reason: Trying to /kick a higher admin.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW,string, (PlayerInfo[playerid][pAdmin] == 1) ? (1) : (2));
Kick(playerid);
return 1;
}
else
{
new year, month,day;
getdate(year, month, day);
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
format(string, sizeof(string), "AdmCmd: %s (IP:%s) was kicked by %s, reason: %s (%d-%d-%d)", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason,month,day,year);
Log("logs/kick.log", string);
if(PlayerInfo[playerid][pAdmin] == 1) Log("logs/moderator.log", string);
format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
SendClientMessageToAllEx(COLOR_RED, string);
Kick(giveplayerid);
}
return 1;
}
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
return 1;
}

Reply


Messages In This Thread
0.3x kick bugged? - by Josh_Main - 03.06.2013, 15:16
Re: 0.3x kick bugged? - by Chenko - 03.06.2013, 15:22
Re: 0.3x kick bugged? - by Josh_Main - 03.06.2013, 15:23
Re: 0.3x kick bugged? - by Chenko - 03.06.2013, 15:25
Re: 0.3x kick bugged? - by Josh_Main - 03.06.2013, 15:30
Re: 0.3x kick bugged? - by SilverKiller - 03.06.2013, 15:32
Re: 0.3x kick bugged? - by Josh_Main - 03.06.2013, 15:36
Re: 0.3x kick bugged? - by Josh_Main - 03.06.2013, 15:38
Re: 0.3x kick bugged? - by FunnyBear - 03.06.2013, 15:42
Re: 0.3x kick bugged? - by Josh_Main - 03.06.2013, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)