Jump to content
Sign in to follow this  
Michelman

Need help with this script

Recommended Posts

I have a script to make a vehicle faster, but how do I make it so only the players on the blufor side have faster cars?

Here is the script:

#define SPEEDX 0.1

while {true} do {
sleep 0.001;
if(vehicle player != player) then {
	_veh = vehicle player;

	if (speed _veh > 20) then {
		_vel = velocity _veh;
		_dir = getdir _veh;
		_veh setvelocity [
			(((_vel select 0) + SPEEDX * (sin _dir)) min 200) max -200,
			(((_vel select 1) + SPEEDX * (cos _dir)) min 200) max -200,
			(_vel select 2) - SPEEDX
		];
	};
};
};

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  

×