01.03.2015, 11:47
Hey guys,
i have another problem and this time, with my ban command, i cant solve it, couse i do not see any problems with it.
This is my /ban command.
It bans the player correctly, but when i ban him (write the command) after the ban is done, the server crashes and it kind of like lags. Banned user disconnect, i disconnect, but both of us are still enabled to be seen in player list (in client window), so yeah, thanks.
i have another problem and this time, with my ban command, i cant solve it, couse i do not see any problems with it.
This is my /ban command.
Код:
CMD:ban(playerid, params[]) { if(PlayerInfo[playerid][pALevel] < 2) return SendClientMessage(playerid, colorba, "You do not have enough level to use this command."); new string[128],userid, reason[48]; if(sscanf(params, "us[48]", userid, reason)) return SendClientMessage(playerid, coloru, "Usage: /ban id reason"); if(userid == INVALID_PLAYER_ID) return SendClientMessage(playerid, colors, "You inserted wrong id!"); if(PlayerInfo[userid][pALevel] > 1) return SendClientMessage(playerid, colorerror, "You cant ban admin."); format(string,sizeof(string),"Admin %s ban player %s: %s",GetName(playerid),GetName(userid),reason); SendClientMessageToAll(cadmin,string); Ban(userid); return 1; }