Quote:
Originally Posted by erminpr0
pawn Code:
new bool: Banned[MAX_PLAYERS char]; CMD:ban(playerid, params[]) { if(!isnull(params)) Banned[params] = true; return 1; }
OnPlayerConnect(playerid) { if(Banned[playerid]) { SendClientMessage(playerid, -1, " You are banned ! "); return Kick(playerid); } }
Make your own ban command, this is example, if you don't understand I'll make it later !
|
Use
char keyword only if you know how to use it.
The declaration is fine but the rest are not:
params is an array and it expects an integer value instead. Also it must be used with {} and not with []. So this:
becomes:
But still.. you need a ban system that will assign whether the player is banned to the variable and act accordingly. There are many filterscripts/tutorials/includes that does what SplinteX wants, just search!