09.11.2009, 17:53
Quote:
Originally Posted by Tigerbeast11
No, i dont want to include OnPlayerDeath or anything... Its m fault, i didnt explain enough
Ok, here goes! I have two teams, TEAM_ATTACKERS and TEAM_DEFENDERS the defenders have to stop the attackers from getting in the checkpoint. when the attacker is in a checkpoint, how can i make a timer which checks if the attacker has stayed in the checkpoint for 7 seconds? Do you understand me now, or do I still need to explain more |
you need to use "OnPlayerEnterCheckpoint" callback to set a timer(SetTimer) if the player is an attacker to call a public function that change yellow[playerid].
and use "OnPlayerLeaveCheckpoint" callback to kill the timer(KillTimer) when the player get out of the checkpoint.
you need to know:
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/OnPlayerLeaveCheckpoint
https://sampwiki.blast.hk/wiki/KillTimer
I hope you find it useful!