CfgSurvival Inventory Handle for Tools

shinkicker

Administrator
Staff member
So we have the starting inventory:

class Inventory {
class Default {
//weapons[] = {"Makarov"};
magazines[] = {"ItemBandage","ItemPainkiller"};
weapons[] = {"ItemFlashlight"};
backpackWeapon = "";
backpack = "DZ_Patrol_Pack_EP1";
};
};

Any one know what the handle is for adding a tool? For example ItemWatch?

I could dig it out of an arma model, but I am hoping someone may have a quick answer in here.
 
It's probably in the weapons as it counts as a weapon ineverything else? BTW what file are you getting that code from?
 
%90 sure it's a "weapon"
I believe it is different for backpacks

Unfortunately not, if you put a tool in weapon it throws an invalid weapon error. The only entries that work in 'weapon' are toolbelt items (flashlight and hatchet).
 
So we have the starting inventory:



Any one know what the handle is for adding a tool? For example ItemWatch?

I could dig it out of an arma model, but I am hoping someone may have a quick answer in here.


For any Item such as ItemJerrycan, these are magazines, if its tool belt like ItemWatch, ItemGPS, then these are weapons ?
 
For any Item such as ItemJerrycan, these are magazines, if its tool belt like ItemWatch, ItemGPS, then these are weapons ?

I only wish. I have tried all combination's and each time I get an error. I think I need to look else where in the code.
 
Does the flashlight in your snippet work? If so then can't you add it to that array?
 
Does the flashlight in your snippet work? If so then can't you add it to that array?

Flashlight is different as its deployable (toolbelt) and so like a pistol for example.

Chatted with someone on skype and the recommendation is to use Items:
 
These variables are initialized in server_playerLogin.sqf

Code:
//Variables
_inventory =    [];
_backpack =    [];
_items =        [];
_magazines =    [];
_weapons =        [];
_medicalStats =    [];
_survival =        [0,0,0];
_tent =            [];
_state =        [];
_direction =    0;
_model =        "";
_newUnit =        objNull;

Tried all the relative ones from that?
 
Also should mention, I don't want the flashlight.

So the issue is you have to have weapon declared, using any of the following throws a bad vehicle type:

// weapons[] = {"ItemFlashlight"};
weapons[] = {""};
weapons[] = {};
 
Back
Top