Jump to content
Sign in to follow this  
R34P3R

problem with player-array...

Recommended Posts

hi there.

i have s little problem with my script. i have 8 spawnpoints on respawn_west. this named p1,p2,p3.... on my init-script i use:

playerarray = [p1,p2,p3,p4,p5,p6,p7,p8];

an on my following script i will check the players with:

{ if ((alive _x) && (_x distance pilot) < 50) then {pilot domove getpos _x} } foreach playerarray;

this work fine if the player is not died before the script will triggered. But if all players died before the Script will not run because the Objects are not exists. How can i Fix this ? the Script running on Server-Side.

Thanks for help

Share this post


Link to post
Share on other sites

Just update the playerarray right before the if-check.

Share this post


Link to post
Share on other sites

The objects should still exist even if they die, unless you delete their corpses. In which case you need to update the array.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×