What is the best way to check if the player is either downed or dead? This is what I did a little quick, but I don't know if it's the best way.
Code Snippet
Plaintext
total_dead_check() { while(1) { if(self maps\_laststand::player_is_in_laststand() || self.dead == true || self.downed == true) { // Stuff when player is either downed or dead } wait .1; } }
This should do the trick. Is there something you are trying to accomplish? If there is something you would like to do for Solo and Co-Op. This would work for Co-Op and if you had Solo Revive.
This should do the trick. Is there something you are trying to accomplish? If there is something you would like to do for Solo and Co-Op. This would work for Co-Op and if you had Solo Revive.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Why isn't anyone referencing actual zombie scripts that check for downed players?... nearly every purchase trigger in zombiemode checks to make sure the player is not in last stand before going forward with the purchase.
Edit: n123q45 already gave this answer, I would mark it as Best Answer so that you will stop getting additional suggestions. This code is the standard check for what you are asking.
Why isn't anyone referencing actual zombie scripts that check for downed players?... nearly every purchase trigger in zombiemode checks to make sure the player is not in last stand before going forward with the purchase.
Edit: n123q45 already gave this answer, I would mark it as Best Answer so that you will stop getting additional suggestions. This code is the standard check for what you are asking.