26.10.2014, 21:09
Guys When i Use /kick To kick player he can' back he said to himServer Closed
I'm not sure I am understanding what you're saying. Are you saying that when you /kick a player, when they go to log back in it says Server Closed the Connection?
|
YCMD:kick(playerid, params[], help)
{
#pragma unused help
if(P_Data[playerid][pAdmin] == 0) return SCM(playerid, COLOR_RED, "You aren't an admin!");
new
string[128],pplayerid, reason[48];
if(sscanf(params, "us[48]", pplayerid, reason)) return SCM(playerid, COLOR_RED, "Usage: /kick [Player ID/Player Name] [Reason]");
if(pplayerid == IPI) return SCM(playerid, COLOR_RED, "Wrong playerid!");
if(P_Data[pplayerid][pAdmin] == 5) return SCM(playerid, COLOR_RED, "You can't ban admin level 5!");
format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"is kick player "COL_WHITE"%s "COL_RED"Reason: %s",GetName(playerid),GetName(pplayerid),reason);
SCMToAll(-1,string);
Kick(pplayerid);
return 1;
}
when i /kick a player, when they go to log back , when he choose skin it says Server Closed the Connection
|
YCMD:ban(playerid, params[], help)
{
#pragma unused help
if(P_Data[playerid][pAdmin] == 0) return SCM(playerid, COLOR_RED, "You aren't an admin!");
new
string[128],pplayerid, reason[48];
if(sscanf(params, "us[48]", pplayerid, reason)) return SCM(playerid, COLOR_RED, "Usage: /ban [Player ID/Player Name] [Reason]");
if(pplayerid == IPI) return SCM(playerid, COLOR_RED, "Wrong playerid!");
if(P_Data[pplayerid][pAdmin] == 5) return SCM(playerid, COLOR_RED, "You can't ban admin level 5!");
format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"is kick player "COL_WHITE"%s "COL_RED"Reason: %s",GetName(playerid),GetName(pplayerid),reason);
SCMToAll(-1,string);
BanEx(pplayerid, reason);
return 1;
}
CMD:kick(playerid, params[])
{
new targetid, reason[64], string[128];
[ADMIN SYSTEM HERE] return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
else if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /kick [playerid] [reason]");
else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot kick administrators of a higher rank.");
format(string, sizeof(string), "SERVER: %s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
format(string, sizeof(string), "%s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
Log("kick.txt", string);
Kick(targetid);
return 1;
}
When i have warn player 5/5 he get a kick when he back for log he choose skin and he tell him Serer closed the conection
|