Jump to content

Recommended Posts

Heya there guys,

 

for an armory like system i am trying to create an addaction which will spawn a custom made gearcrate, so for this i will have to spawn a crate , clear that crate of cargo and then fill it with the items needed for that class.

 

now i am trying to add a deletevehicle for the spawned crate so that it get's removed after 10 mins

 

this is what i have so far:

_Assaultcrate = CreateVehicle ["Box_Nato_Wps_F", getmarkerPos "Gearspawn1", [], 1, "CAN COLLIDE"];
sleep 5;
hint 'Assault Gear Spawned';

//boxcontents
Clearweaponcargo _Assaultcrate;
Clearmagazinecargo _Assaultcrate;
Clearbackpackcargo _Assaultcrate;
Clearitemcargo _Assaultcrate;

_Assaultcrate additemcargo
	[,];
	
_Assaultcrate addweaponcargo
	[,];
	
_Assaultcrate addbackpackcargo
	[,];
	
_Assaultcrate addmagazinecargo
	[,];
	
Sleep 600;
Deletevehicle _Assaultcrate;

however the crate is not despawning after the 10 minutes ..

 

any1 got an idea on how to fix this?

 

Greetings,

 

Eliree

Share this post


Link to post
Share on other sites

just got a second issue on this matter:

 

i am trying to make the addaction only available to certain uid's so i've done the following:

 

Added this to the box where i want the addaction on:

this = execVM "Scripts\cratespawn.sqf";

and i've put this in the Cratespaqn.sqf:

if ((getPlayerUID player) in ["UID listed here"]) then
{
	_act = player addaction ["Spawn assault gear",{execVM "Scripts\Gearcrates\assault.sqf"}];
};

any ideas ?

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

×