Jump to content
Sign in to follow this  
mia389

scipt halo help

Recommended Posts

I am trying to start my mission with a few guys paradroping in. I put this in there init line

null = [this] execVM "scripts\halo.sqf"; 

halo.sqf

if (!isServer) then {
waitUntil {alive player};
_unit = player;
_unit addweapon "ACE_ParachutePack";
_unit setPos [(position _unit select 0), (position _unit select 1), 3000];
_unit execVM "x\ace\addons\sys_eject\jumpout_cord.sqf"; 
};

This is for a dedicated server. My problem is the script is executing multiple times. Once for each player joining. How can I fix this?

Also is there a way I can make this more efficient than pasting

null = [this] execVM "scripts\halo.sqf";

into delta_1, delta_2, delta_3, init lines?

Share this post


Link to post
Share on other sites

if (!isServer) then -> if (_this select 0==player) then

Change the handle from null to zero. If you use nil or null, those commands will assume the value of the handle and they will be unusable for their proper purposes.

Share this post


Link to post
Share on other sites

Like this?

0 = [this] execVM "scripts\halo.sqf";

if (_this select 0==player) then {

waitUntil {alive player};
_unit = player;
_unit addweapon "ACE_ParachutePack";
_unit setPos [(position _unit select 0), (position _unit select 1), 3000];
_unit execVM "x\ace\addons\sys_eject\jumpout_cord.sqf"; 
};

Edited by mia389

Share this post


Link to post
Share on other sites

Just making sure that is what you meant before I edited then started server

---------- Post added at 06:00 PM ---------- Previous post was at 04:46 PM ----------

worked great, Thanks much

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  

×