Jump to content
Sign in to follow this  
MrZig

Red's gun on ground script

Recommended Posts

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;__

;::::::::::::::::::::::::

;--Init vars

_table = _this select 0

_weapon = _this select 1

_ammo = _this select 2

_height = _this select 3

weapon = "WeaponHolder" createVehicle [getpos _table select 0,getpos _table select 1,(getpos _table select 2) + _height]

weapon addweaponCargo [_weapon,1]

weapon addMagazineCargo [_ammo,4]

weapon setpos [getpos _table select 0,getpos _table select 1,_height]

Exec with

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[nameofgamlogic, weaponname, ammoname, heightoffground] exec "weapon.sqs"

and no weapon shows up!

I really need this for my mission, can you help me with it? Why won't a weapon show up at the gamelogic? I put everything I need in..

Share this post


Link to post
Share on other sites

Have you tried executing it with a trigger? The script worked for me like that (many thanks to Red for the script!)

[Greth Gates must die]

Share this post


Link to post
Share on other sites

Actually I did.

It's probably somthing really obvious, but it won't work.

Btw, does createvehicle work in Multiplayer?

Share this post


Link to post
Share on other sites

What exactly are you executing the script with? Also make sure the weaponname and the ammoname are enclosed in bunnies ears: "m16" for example.

RED

Share this post


Link to post
Share on other sites

I'm executing it with a trigger, well, I've tried almost everything.

Yeah, I tried ak47 and ak47 for weapon and ammo, no dice.

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  

×