Posts: 2,286
Threads: 18
Joined: Jun 2010
Quote:
Originally Posted by pds2k12
I made you a very basic, warn system, maybe you could finish it
pawn Код:
new Warn[MAX_PLAYERS];
CMD:warn( playerid, params[ ] ) { new targetid; if( sscanf( params, "u",targetid ) ) return SendClientMessage( playerid, -1, "Usage: /warn [PlayerName/ID]" );
Warn[targetid] ++; return true; }
public OnPlayerUpdate((playerid) { if(Warns[playerid] >= 3) return Kick(playerid); //kicking the player if he reaches 3 or more warning return true; }
|
Why would you check if the player has 3 warnings OnPlayerUpdate when the only way for them to get warnings is through the warn command?