AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   sliencers.....can they be turned off? (https://forums.alliedmods.net/showthread.php?t=16811)

gunsniper 08-20-2005 19:02

sliencers.....can they be turned off?
 
in one of my mods i have a m203 granade launcher on the m4a1 and was wondering if you could disable the sliencer, because every time u fire a nade it delays the guns fireing?.....any help?

XxAvalanchexX 08-20-2005 19:54

Try changing this block of code:
Code:
public forward_playerprethink(id) {   if(is_user_alive(id))   {     if (entity_get_int(id, EV_INT_button) & IN_ATTACK2)     {       launch_nade(id)       return FMRES_IGNORED     }   }   return FMRES_IGNORED }
to this:
Code:
public forward_playerprethink(id) {   if(is_user_alive(id))   {     if (entity_get_int(id, EV_INT_button) & IN_ATTACK2)     {       launch_nade(id)       return FMRES_OVERRIDE     }   }   return FMRES_IGNORED }

Twilight Suzuka 08-20-2005 23:26

it should be SUPERCEDE.

XxAvalanchexX 08-21-2005 01:07

Yeah, that.

gunsniper 08-21-2005 17:42

well.......
 
well what do i do if that section of code isant in the plugin.......do i just add it?

DahVid 08-21-2005 17:43

Code:
public forward_playerprethink(id) {   if(is_user_alive(id))   {     if (entity_get_int(id, EV_INT_button) & IN_ATTACK2)     {       launch_nade(id)       return FMRES_SUPERCEDE     }   }   return FMRES_IGNORED }

I don't even know where avalanche got this, but replace launch_nade(id) with your nade-launching function name. This should already be in here, well the forward function.

gunsniper 08-21-2005 18:03

hmmmmm...missing the code.......wait got it......well......ok i guess

DahVid 08-21-2005 18:05

Yes there is a public forward_playerprethink or the forward would be fucked.

XxAvalanchexX 08-21-2005 18:17

DahVid, I got that code from the plugin. What it does is when secondary fire is called not only does it perform the grenade launching code but tells the game not to continue on with the secondary fire code, so it won't silence.

gunsniper 08-21-2005 18:36

hey dahvid......ur code dident work....im tryin XxAvalanchexX's.....


All times are GMT -4. The time now is 14:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.