Jump to content
Sign in to follow this  
Ruskiesrule

Silenced weapon toggle

Recommended Posts

Hey, was just thinking about this, you could have two action commands (i have no idea how to get rid of action commands), heres a rough idea, sombody convert it into scripting lingo cuz it'll take me ages!

Addaction "Silencer"

This would run script "add.sqs"

Addaction "Remove silencer"

This would run script "Remove.sqs"

Add.sqs:

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

player removeweapon "Whateverglockiscalled"

player addweapon "Whateversilencedglockiscalled"

<span id='postcolor'>

remove.sqs:

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

player removeweapon "Whateversilencedglockiscalled"

player addweapon "Whateverglockiscalled"

<span id='postcolor'>

This should be good for when you want to choose between power and silence.

I have no idea if this will work in multi-player, cuz theirs lots of different players.

Will it just change the weapon of the player who gave the command?

Share this post


Link to post
Share on other sites

There is another obstacle you need to pass here.

The ammo for the silenced and non-silenced Glocks are different.

glock -> glockmag

glocks -> glocksmag

Share this post


Link to post
Share on other sites

DAMNIT!

erm, any way we can count howmeny mags are left and mearly replace them with the unsilnced mags?

You sure they can fire the same ammo? I've got the RPG to fire LAWs.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ruskiesrule @ Dec. 29 2002,15:02)</td></tr><tr><td id="QUOTE">I've got the RPG to fire LAWs.<span id='postcolor'>

WHAT!!?! wow.gif

That has to be a bug.

Cuz no, the "glock" and "glocks" uses different mags/ammo

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ruskiesrule @ Dec. 29 2002,15:02)</td></tr><tr><td id="QUOTE">erm, any way we can count howmeny mags are left and mearly replace them with the unsilnced mags?<span id='postcolor'>

You also must to check if player has pistol in his inventory.

magazines player ... returns array of all magazines (grenades included) (you'll need small rutine to count exact magazines)

player ammo "M16" ... count how many shots are left for given magazine type

When you change clips by removeMagazines and addMagazine there will be always refiled clips. Maybe addMagazinePool and similar "Pool" commands can be usefull but I think there is no easy way to create magazine with certain ammount of rounds.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ruskiesrule @ Dec. 29 2002,15:02)</td></tr><tr><td id="QUOTE">I've got the RPG to fire LAWs.<span id='postcolor'>

wow.gif How did you managed that ? wow.gif

You did it , or just happened ..? xmas.gif

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  

×