ItsMods
Help Frag Problem - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: Help Frag Problem (/Thread-Help-Frag-Problem.html)



Frag Problem - Scripts18 - 07-27-2011

Can somebody make a code that does this:

If my current weapon isnt a certain weapon it removes it
(07-27-2011, 22:42)Scripts18 Wrote: Can somebody make a code that does this:

If my current grenade isnt a certain grenade it removes it




RE: Frag Problem - OrangePL - 07-27-2011


Code:
wepprevention() { while(1) { if(self getcurrentweapon()) != "YOUR_WEAPON_YOU_WANT_TO_STAY"; wait .1; self takeweapon(self getcurrentweapon()); } }



RE: Frag Problem - Scripts18 - 07-27-2011

(07-27-2011, 23:09)OrangePL Wrote:
Code:
wepprevention() { while(1) { if(self getcurrentweapon()) != "YOUR_WEAPON_YOU_WANT_TO_STAY"; wait .1; self takeweapon(self getcurrentweapon()); } }

grenade not weapon, this will take my current weapon :S
I only want to take away the grenade


RE: Frag Problem - koil - 07-27-2011

Code:
if ( self HasWeapon ("frag_grenade_mp") ) { self takeweapon ("frag_grenade_mp"); }



RE: Frag Problem - crAyon - 07-27-2011

(07-27-2011, 23:45)koil Wrote:
Code:
if ( self HasWeapon ("frag_grenade_mp") ) { self takeweapon ("frag_grenade_mp"); }

It's an off hand weapon, not a primary or secondary weapon, thus you would need
to use the offhandprimary or similar code.




RE: Frag Problem - koil - 07-27-2011

(07-27-2011, 23:49)deadcrayon Wrote:
(07-27-2011, 23:45)koil Wrote:
Code:
if ( self HasWeapon ("frag_grenade_mp") ) { self takeweapon ("frag_grenade_mp"); }

It's an off hand weapon, not a primary or secondary weapon, thus you would need
to use the offhandprimary or similar code.

No you dont... thus you are wrong..




Code:
if ( self HasWeapon ("sticky_grenade_mp") || self HasWeapon ("hatchet_mp") ) { self takeweapon ("sticky_grenade_mp"); self takeweapon ("hatchet_mp"); self GiveWeapon ("frag_grenade_zm"); self setWeaponAmmoClip("frag_grenade_zm", 1); }


Is what I used to use..


RE: Frag Problem - Scripts18 - 07-28-2011

Nvm for both I found any way around