Quote:
Originally Posted by VincentDunn
First you need a way of saving account stats.
Second, you can define variables.
Example:
pawn Код:
new IsJailed = 0 public OnPlayerDisconnect(playerid) { if(GetPlayerWantedLevel(playerid) > 3) { IsJailed = 1; //If a player logs off with a wanted level greater than 3. Then the IsJailed would be set to 1 or yes. } return 1; } public OnPlayerSpawn(playerid) { if(IsJailed == 1) { SetPlayerPos(playerid,You would put the jail coordinates here); SetTimer("JailTime",60000,false); //If a player's variable IsJailed is set to 1 or yes then it will set a timer of 60 seconds. } } forward JailTime(playerid); public JailTime(playerid) { SetPlayerPos(playerid,you eould put the release coords here.); IsJailed = 0; //After those sixty seconds are up. They will be released and heir IsJailed would be set to 0 or 'no'. }
|
You need to add [MAX_PLAYERS] to that, and use isJailed[playerid] or it will be a global variable (aka for everyone).