Posts: 338
Threads: 44
Joined: Dec 2007
Reputation:
0
Create enumeration, then define global or PVar that indicates player job, and lastly check it. Need code example?
Posts: 14
Threads: 5
Joined: Jul 2011
Reputation:
0
I have to put them in order , or one somewhere and another somewhere ? Or after the command?
Posts: 14
Threads: 5
Joined: Jul 2011
Reputation:
0
Thank you very much Niixie , how could I set a timer when the player gets there and gets in the checkpoint? A timer that holds the player in the checkpoint for like 5 minutes ?
Posts: 338
Threads: 44
Joined: Dec 2007
Reputation:
0
You'd need to do it like this :
OnPlayerEnterCheckpoint
Check if it's the right player/checkpoint(if they're streamed) and then
you'd start some idling process (such as being frozen with TogglePlayerControllable) and add your timer :
SetTimer( "your_public_function" , runs only once )
public your_public_function(playerid)
{
Here you'd stop your idling process (such as unfreezing player) and probably give further commands, for instance the next checkpoint.
}
If you didn't understand it yet (I really hope you did) someone or I could write short example of this.
Posts: 14
Threads: 5
Joined: Jul 2011
Reputation:
0
I understand , but how to check if it's the right player/checkpoint?
Posts: 523
Threads: 34
Joined: Aug 2008
Reputation:
0
Just check if the player is in a checkpoint and if his job is pizzaguy, if he is run the timer.