Profile Posted August 31, 2017 Posted August 31, 2017 Hi, I would like to create a check to check if all the players in a map (they will be in a party) are dead. If all players in the party are dead, It will teleport all players back to savepoint. However, It will do nothing if only one player dies or if is ressurected. I have already set mapflag so that players can't leave party. Could anybody assist me? Thanks! Quote
0 Cyro Posted September 3, 2017 Posted September 3, 2017 May be try something like this OnTimer20000: if (getmapusers("yourmap") == 0) { announce "All players failed to survive",0; end; } Quote
0 crazyarashi Posted August 31, 2017 Posted August 31, 2017 54 minutes ago, Profile said: Hi, I would like to create a check to check if all the players in a map (they will be in a party) are dead. If all players in the party are dead, It will teleport all players back to savepoint. However, It will do nothing if only one player dies or if is ressurected. I have already set mapflag so that players can't leave party. Could anybody assist me? Thanks! May I Ask if is this running on an instance? :)) Quote
0 Profile Posted September 2, 2017 Author Posted September 2, 2017 No, it is not running on an instance. Quote
0 Profile Posted September 4, 2017 Author Posted September 4, 2017 Ok, so the best option is to check with a timer? I thought there was a better function for this. Thanks. Quote
0 Technoken Posted September 4, 2017 Posted September 4, 2017 Using OnPCDieEvent is possible too. It will trigger the checking everytime someone dies inside the map, while OnTimer will trigger the checking every XXXX ms. Btw using getmapusers will return the number of players inside the map, so it will still count dead characters as long as they are inside the map. Quote
0 Profile Posted September 4, 2017 Author Posted September 4, 2017 22 minutes ago, Technoken said: Using OnPCDieEvent is possible too. It will trigger the checking everytime someone dies inside the map, while OnTimer will trigger the checking every XXXX ms. Btw using getmapusers will return the number of players inside the map, so it will still count dead characters as long as they are inside the map. Ok, in my case using OnPCDieEvent is the best option. Thanks! Quote
Question
Profile
Hi, I would like to create a check to check if all the players in a map (they will be in a party) are dead.
If all players in the party are dead, It will teleport all players back to savepoint.
However, It will do nothing if only one player dies or if is ressurected.
I have already set mapflag so that players can't leave party.
Could anybody assist me?
Thanks!
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.