Ban Command
#1

Hey, I've scouted through the tutorial section of the forums a bit but I simply can't seem to find any tutorial regarding a ban system? Therefore I'd love it if anyone could help me out with a ban system, somehow. Perhaps send me a tutorial that I haven't found, or something? It'd be awesome!

Regards,
Reply
#2

Use ******
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=401701

Here.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)