Ban cmd problem
#1

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 :

Код:
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); }
Sorry for my bad English and have a nice english,
thx for future help.
Reply


Messages In This Thread
Ban cmd problem - by Dolerath - 22.12.2013, 21:10
Re: Ban cmd problem - by TheOriginal1337 - 22.12.2013, 21:14
Re : Ban cmd problem - by Dolerath - 22.12.2013, 21:48
Re: Ban cmd problem - by J4mmyHD - 22.12.2013, 22:19
Re: Ban cmd problem - by HavingGood - 22.12.2013, 22:28
Re : Ban cmd problem - by Dolerath - 23.12.2013, 17:25

Forum Jump:


Users browsing this thread: 1 Guest(s)