Ban Command
#4

Thanks guys, but I used my old script for kicking a player and turned it into a ban system. Ironically the ban command now works as a kick, due to the fact that the player can log in again after he's been "banned".

pawn Код:
CMD:ban(playerid,params[])
{
    if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xF69521AA, "You can't use this command!");//Checking if the player has admin level 1, if not it sends him a message.
    new id;//Creating a variable to store the selected id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,0xF69521AA,"USAGE: /ban [id]");//Checking if the player has selected an id, other wise it sends him a message. We used the "u" specifier, because he can put a name or an id.
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xF69521AA,"That player is not connected!");//Checking if the selected user is connected or not.
    Ban(id);
    SendClientMessage(playerid,0xF69521AA,"You have successfully banned the selected user from La Ville De L'Isle Roleplay!"); // Sends the admin a message.
    return 1;
}
Help would be highly appriciated!

Regards,
Reply


Messages In This Thread
Ban Command - by Vasu99 - 01.03.2014, 18:56
Re: Ban Command - by Clad - 01.03.2014, 19:18
Re: Ban Command - by Bingo - 01.03.2014, 19:21
Re: Ban Command - by Vasu99 - 01.03.2014, 19:48

Forum Jump:


Users browsing this thread: 1 Guest(s)