Jump to content

Adding Ammo to DZE Vehicles @ startup / traders


Torndeco

Recommended Posts

Note this script might be broken etc... unfinished etc...

 

Basicly its  hardcoded script to add ammo to vehicles when bought @ traders or at server startup.

 

Done like this till i get a chance to code saving ammo to hive.

Plus  i like having vehicles without radar

 

 

Save as dayz_server\compile\fnc_vehicle_ammo.sqf

http://pastebin.com/kefAXLyX

 

 

Edit server_publishVehicle2.sqf

Edit server_publishVehicle.sqf

Edit server_montior.sqf

 

Look for

    _object call fnc_veh_ResetEH;

Add afterwarsd
    [_object, _class] call fnc_veh_Ammo;

 

--------------

 

Edit  server_functions.sqf

Look for

server_deaths =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";

Add afterwards

fnc_veh_Ammo =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_vehicle_ammo.sqf";

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Loved using this script on my server, but as of 1.0.4.2, it seems that the syntax is incorrect inside of the server_monitor.sqf . Any clues?

12:06:31 Error Undefined variable in expression: _type
12:06:31 File z\addons\dayz_server\compile\fnc_vehicle_ammo.sqf, line 5
12:06:31 Error in expression <_object call fnc_veh_ResetEH;
[_object, _class] call fnc_veh_Ammo;

if(_ownerID >
12:06:31 Error position: <_class] call fnc_veh_Ammo;

if(_ownerID >
12:06:31 Error Undefined variable in expression: _class
12:06:31 File z\addons\dayz_server\system\server_monitor.sqf, line 228
12:06:31 "DEBUG: VEHICLE: any Adding Ammo"
12:06:31 Error in expression <rmat ["DEBUG: VEHICLE: %1 Adding Ammo", _type];

switch (_type) do
{
case "Mi17_>
12:06:31 Error position: <_type];

switch (_type) do
{
case "Mi17_>
12:06:31 Error Undefined variable in expression: _type
12:06:31 File z\addons\dayz_server\compile\fnc_vehicle_ammo.sqf, line 5
12:06:31 Error in expression <_object call fnc_veh_ResetEH;
[_object, _class] call fnc_veh_Ammo;

if(_ownerID >
12:06:31 Error position: <_class] call fnc_veh_Ammo;

if(_ownerID >
12:06:31 Error Undefined variable in expression: _class
12:06:31 File z\addons\dayz_server\system\server_monitor.sqf, line 228
12:06:31 "DEBUG: VEHICLE: any Adding Ammo"
12:06:31 Error in expression <rmat ["DEBUG: VEHICLE: %1 Adding Ammo", _type];
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...