Arma 3
Kamber Apr 24, 2021 @ 2:37am
Parachute Script
hello guys
I have a question for you. I have a server and I want to add a script to this server where people will open their parachutes at 100 meters after they parachute. This works successfully when I put the following commands into the init.sqf file in my task;
[] spawn
{
while {true} do
{private ['_player','_chute'];
if ( (getPosATL player select 2 > 100) && (vehicle player IsEqualto player) && (alive player)) then
{
waitUntil {(position player select 2) <= 100};
addCamShake [8, 2, 20];
chute = createVehicle ['Steerable_Parachute_F', position Player, [], 0, 'FLY'];
chute setPos position player;
player moveIndriver chute;
chute allowDamage false;
};
sleep 2;
};
};
but I don't know how to adapt it to my dedicated server. When I put it in the init.sqf file, it doesn't work.
Would you be helping me in this regard?
< >
Showing 1-1 of 1 comments
Grovesy Apr 24, 2021 @ 8:22pm 
the init.sqf is still executed when on a dedicated server. The reason the script doesn't work on your dedicated server is because there's no longer just one player. So instead you need make the code run for every player connected.
Maybe try pasting your code straight into initPlayerLocal.sqf as that should run once for every player that connects to the server, and execute locally on their machine.

https://community.bistudio.com/wiki/player
https://community.bistudio.com/wiki/Event_Scripts#initPlayerLocal.sqf
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Apr 24, 2021 @ 2:37am
Posts: 1