Jump to content
Sign in to follow this  
[lol]clan killer bee

Setfuel dedicated problem

Recommended Posts

Hi guys, I have searched for this problem but there was no hit on it so here is my question !

I want to setfufel form a car and the ammo !

I used the init field of the car and in the editor it works fine.

This is the code

enemy3 setfuel 0.005;enemy3 setVehicleAmmo 0.1 

When used on a dedicated server it fails accept the ammo part that does work

I found out that if you make a car.sqf and add the line in and activated it by this

nul = execVM "car1.sqf";

It works fine also on dedicated.

I need to get this script working for 3 vehicles what command do I need use instead only the name (enemy3) of the car so it works for all 3 cars that run the

nul = execVM "car1.sqf";

propperly for all cars who get the code in the init field ?

Tried already _vehicle and _vehicle = vehicle and _x ?

Or do I need to make 3 separate scripts ?

Thank you !

Share this post


Link to post
Share on other sites

nul = this execVM "car.sqf";

car.sqf

_this setfuel 0.005;

_this setVehicleAmmo 0.1;

Share this post


Link to post
Share on other sites

You could do what Kempco says, or even better you could just through your init call a script (car.sqf) like this.

Init.sqf

[enemy1,enemy2,enemy3] execVM "car.sqf";

car.sqf

{
  _x setFuel 0.005;
  _x setVehicleAmmo 0.1;
} forEach _this;

Share this post


Link to post
Share on other sites

Thanks for the help guys.

Sorry that is took a little long but have been sick :(

In my case I had to use Kempco because there was a trigger activation side involved, but without the trigger yours is a good option Horner.

Thanks for your help again.

Sencerly,

Killerbee

Share this post


Link to post
Share on other sites

No problem, hope you feel better.

Also, if it's a present trigger for a player you can always do...

Condition

this and vehicle player in thisList;

On Act.

vehicle player setVehicleAmmo 0.1;
vehicle player setFuel 0.005;

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  

×