Jump to content
Sign in to follow this  
Mitch

WeaponHolder help (sort of)

Recommended Posts

I need help.

Iv placed a table and managed to create a weapon on a table using a WeaponHolder. Thats not exactly my problem.

This is the code so far (placed in my tables init):

holder = "WeaponHolder" createVehicle getpos this; 
holder addWeaponCargo ["M16A4",1];
holder setPos [getPos this select 0, getPos this select 1, 0.775];

What I need to do is to lock or disable the gun (heres my problem) that is now on the table so that the player cannot pick it up, infact so the user cannot see any sort of action when looking at the gun i.e the "Take M16A4"

I'v tried all I know to solve this!

Please some one put me out of my pain ! :confused:

Thanks in advance, im sure this is very easy and im just being a noob. :p

Share this post


Link to post
Share on other sites

Sorry but dont think that is possible. Only thing i can think of is some workaround liek detecting players weapon and if he grabs it that manually removing it and putting it back to the holder with a hint like "You cant just take any weapon you see...". Havent ever seen a weaponhoder locked or something

Share this post


Link to post
Share on other sites

Hmm, thats a BIG pain if its impossible. :mad:

My first attempt was to use the 'removeAction' command then I realised this cannot remove an objects standard actions. I figured that seen as 'createVehicle' was used the weaponholder would be a vehicle and as such I could some how 'lock' it, and thus get rid of the actions like you can a vehicle.

Does anyone know any other way I can display a weapon on a table but with my problem solved? Long shot I know.. :(

Thanks for your help PJ; your option so far seems my only feasible one.

I'll still take any advice on how to fix my problem though, and any more work arounds.

Share this post


Link to post
Share on other sites

Do it the Domination way. Each players crate is using createVehicleLocal on his particular client, and that can be filled with whatever weapon you find suitable for your own setup. Note that regular Domination has the same weapons for all players (even though the crate is still local), and when d_limited_weapons (only for non ACE version, using an fsm script), you're given a message that you can't pick it up.

That gets annoying with a ton of items you can't use, so I did it in another way myself. Without going into details, you can find the mission here. De-pbo and use whatever suits you mission or scripting methods.

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  

×