Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=396277)
Help -
[rG]Cold - 30.11.2012
I have a checkpoint.
When a player enters it a countdown starts. If 2 players are at the same time in it,the countdown gets bugged.
I would like to disable the checkpoint for others when someone in it,and enable it if the player left the checkpoint while the countdown is on.
How can i do that?
Re: Help -
DaRk_RaiN - 30.11.2012
Use a variable for it.
Re: Help -
[rG]Cold - 30.11.2012
Quote:
Originally Posted by DaRk_RaiN
Use a variable for it.
|
Could you explain bit more?
Re: Help -
DaRk_RaiN - 30.11.2012
I'm gonna add you in Skype.
Re: Help -
[rG]Cold - 30.11.2012
Havent fixed the problem yet. Anyone?
Re: Help -
Mmartin - 30.11.2012
You can use various methods there. Either disable the checkpoint as soon as anyone enters and re-enable it after he finishes the operation in it, or let the checkpoint be and create a boolean variable for CP's availability - setting and checking that instead of disabling and re-drawing the checkpoint. You can also look through all players and check if anyone else is in the checkpoint and then either do or not do the operation - but I'd not recommend this one. Pick the 1st or 2nd, nothing hard to script.
Also, find a spare time to read this:
https://sampforum.blast.hk/showthread.php?tid=395711