22.12.2013, 21:10
Hello guys,
I've a problem with my ban command, it shows me the message that i'm banned but when I reconnect, I'm not banned I can connect correctly. Here is my code :
Sorry for my bad English and have a nice english,
thx for future help.
I've a problem with my ban command, it shows me the message that i'm banned but when I reconnect, I'm not banned I can connect correctly. Here is my code :
Код:
CMD:ban(playerid, params[]) { new id, reason[150], message[150], nameAdmin[MAX_PLAYER_NAME], nameKicked[MAX_PLAYER_NAME]; GetPlayerName(playerid, nameAdmin, sizeof(nameAdmin)); if(User[playerid][USER_ADMIN] >= 3) { if(aDuty[playerid] == 1) { if(!sscanf(params, "is[150]", id, reason)) { if(IsPlayerConnected(id)) { GetPlayerName(id, nameKicked, sizeof(nameKicked)); format(message,sizeof(message), "%s a йtй banned par %s : %s", nameKicked, nameAdmin, reason); SendClientMessageToAll(COLOR_RED, message); SetTimerEx("BanPublic", 500, false, "i", id); } else return SendClientMessage(playerid, COLOR_RED, "[ERREUR] : Joueur non trouvй"); } else return SendClientMessage(playerid, COLOR_RED, "[ERREUR] : /ban <id> <raison>"); } else return SendClientMessage(playerid, COLOR_RED, "[ERREUR] : Vous n'кtes pas en service -> /aduty"); } else return SendClientMessage(playerid, COLOR_RED, "[ERREUR] : Vous n'кtes pas admin"); return 1; } forward BanPublic(playerid); public BanPublic(playerid) { Ban(playerid); }
thx for future help.