Jump to content
undecieved07

Console command to spawn a gun inside a crate I am pointing at

Recommended Posts

Hello everyone , 

 

I am trying to spawn a gun inside a crate I am pointing at with this using the console command:

 

cursorObject addWeaponCargo ["rhs_weap_m107_leu",3];

 

I exec it locally and it doesn't work.

 

PS: I am running a dedicated server with me as an admin.

 

Regards. 

Share this post


Link to post
Share on other sites

thank you killzone_kid for the feedback , I have checked the addWeaponCargo in the wiki before coming here , unfortunately it doesn't help me , caoz The syntax is correct yet it doesn't work

regards.

Share this post


Link to post
Share on other sites
6 minutes ago, undecieved07 said:

thank you killzone_kid for the feedback , I have checked the addWeaponCargo in the wiki before coming here , unfortunately it doesn't help me , caoz The syntax is correct yet it doesn't work

regards.

 

That is weird, could you post your syntax here? It should work.

Share this post


Link to post
Share on other sites
8 minutes ago, undecieved07 said:

thank you killzone_kid for the feedback , I have checked the addWeaponCargo in the wiki before coming here , unfortunately it doesn't help me , caoz The syntax is correct yet it doesn't work

regards.

 

Saying "it doesn't work" won't get you anywhere.

Post how you tested it.

 

To get the cursor position use screenToWorld.

Example:

_crate = "Box_NATO_Support_F" createVehicle screenToWorld [0.5,0.5];
_crate addWeaponCargo [currentweapon player,15];

Tested and working.

 

Cheers

Share this post


Link to post
Share on other sites
3 minutes ago, Grumpy Old Man said:

 

Saying "it doesn't work" won't get you anywhere.

Post how you tested it.

 

To get the cursor position use screenToWorld.

Example:


_crate = "Box_NATO_Support_F" createVehicle screenToWorld [0.5,0.5];
_crate addWeaponCargo [currentweapon player,15];

Tested and working.

 

Cheers

It worked for me as soon as I pointed my cursor on a vehicle. I guess there is something wrong with the crate I was working with.

thank you very much.

 

Regards.

 

 

Share this post


Link to post
Share on other sites
1 hour ago, undecieved07 said:

thank you killzone_kid for the feedback , I have checked the addWeaponCargo in the wiki before coming here , unfortunately it doesn't help me , caoz The syntax is correct yet it doesn't work

regards.


Not sure you read it properly. It basically says that use addWeaponCargoGlobal instead

  • Like 1

Share this post


Link to post
Share on other sites

Try this:

cursorObject addWeaponCargoGlobal ["arifle_MX_F", 1];

 

Share this post


Link to post
Share on other sites
10 hours ago, killzone_kid said:


Not sure you read it properly. It basically says that use addWeaponCargoGlobal instead

Ahh, missed the dedicated server part, addWeaponCargoGlobal it is then.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, undecieved07 said:

Yeah , thank you addWeaponCrago works ver well.


Great, just don't come back and ask why other people cannot see the weapons you put in the box, mmk?

  • Like 2

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

×