30.05.2012, 15:35
Hello every one
i would like to make Banned Command Without Using
i want Make it with enum like this
But its not the problem . The problem is How to make UnBanned for Not Connected Player ?
i would like to make Banned Command Without Using
pawn Код:
Ban(playerid);
pawn Код:
COMMAND:ban(playerid, params[])
{
new string[208 + MAX_PLAYER_NAME],PlayerN[MAX_PLAYERS],OtherN[MAX_PLAYERS];
if(AccountInfo[playerid][AdminLevel] >= 3)
{
new targetid,String[156];
if(sscanf(params,"us", targetid,String)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Ban "WHITE"[playerid] [REASON]");
if(AccountInfo[playerid][AdminLevel] < AccountInfo[targetid][AdminLevel]) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't use this command on A Higher Level Admin Then You!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid PlayerID"RED"(Player Not Connected)!");
if(String[0] <= 4) return SendClientMessage(playerid, COLOR_RED, "Your Reason Needs To Be More Than 4 Characters");
GetPlayerName(playerid,PlayerN,sizeof(PlayerN));
GetPlayerName(targetid,OtherN,sizeof(OtherN));
format(string, sizeof(string), ""BLUE"\"%s\""RED" Was Banned By Admin "BLUE"\"%s\""RED" Reason: %s", OtherN, PlayerN,String);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
printf("\"%s\"Was Banned By Admin \"%s\" Reason %s",OtherN, PlayerN,String);
AccountInfo[playerid][Banned] = 1;
}
else return SendClientMessage(playerid,COLOE_ORANGE,"You "RED"Are Not High Enough "GREEN"level "WHITE"to use this "BLUE"Command");
return 1;
}