Hello ItsMods. I've been browsing your forums for quite a while now and I've started doing some basic moding a bit and I've ran into a little problem. I'm pretty sure this problem isn't in my code. I think I'm just having a little wrong approach here.
Anyway, here's my problem:
Currently I'm making a function that freezes every player for 10 seconds. For example, when someone presses ActionSlot1 key (X on keyboard) then everyone gets frozen, timer counts 10 seconds and everyone gets unfrozen.
Now the problem I'm encountering is that when the guy who frozes everyone dies during the timer countdown, the script stops, therefor the timer stops and everyone is frozen forever.
I'm pretty sure this problem is because I'm coding everything inside the onPlayerSpawn() function which has a safety feature at the beginning of it: self endon("death");
I haven't fully figured out how the logic in BO works yet. So how could I prevent this from happening? Should I create a new separate function for frozing people in which I WONT put the self endon("death"); ?
Any help appreciated. Thanks!
Anyway, here's my problem:
Currently I'm making a function that freezes every player for 10 seconds. For example, when someone presses ActionSlot1 key (X on keyboard) then everyone gets frozen, timer counts 10 seconds and everyone gets unfrozen.
Now the problem I'm encountering is that when the guy who frozes everyone dies during the timer countdown, the script stops, therefor the timer stops and everyone is frozen forever.
I'm pretty sure this problem is because I'm coding everything inside the onPlayerSpawn() function which has a safety feature at the beginning of it: self endon("death");
I haven't fully figured out how the logic in BO works yet. So how could I prevent this from happening? Should I create a new separate function for frozing people in which I WONT put the self endon("death"); ?
Any help appreciated. Thanks!