Question How can I kill all players and end game on zombies

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,016
Reaction score
2,897
Points
1,103
It's a while but something like this should get your job done:

C++:
kill_all_players() {
    players = getplayers();
    for (i = 0; i < players.size; i++) {
        players[i] DisableInvulnerability() // Optional: Make sure the player is not invincible
        players[i].health = 0; // Set player's health to 0, effectively killing them
    }
}

You can check my code for the NzV menu which you can find here:
Please, Log in or Register to view URLs content!


There a lot of functions and methods can be found :smile:
 

gnec342

Known Member
Messages
2
Reaction score
0
Points
101
It's a while but something like this should get your job done:

C++:
kill_all_players() {
    players = getplayers();
    for (i = 0; i < players.size; i++) {
        players[i] DisableInvulnerability() // Optional: Make sure the player is not invincible
        players[i].health = 0; // Set player's health to 0, effectively killing them
    }
}

You can check my code for the NzV menu which you can find here:
Please, Log in or Register to view URLs content!


There a lot of functions and methods can be found :smile:
That didn't work, Zombies seem to ignore me
 
Top