AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Disabling an attack in NS (https://forums.alliedmods.net/showthread.php?t=10997)

KCE 03-06-2005 22:03

Disabling an attack in NS
 
How do I disable an attack in NS, in this case, devour?

XxAvalanchexX 03-07-2005 16:22

Use the Client_PreThink forward, and check if they are on the alien team. If so, use get_user_button and check if they are IN_ATTACK. If they are, check if they have the devour weapon out. If so, set it so they are no longer IN_ATTACK.

KCE 03-07-2005 17:29

I don't know if it's safe to use preThink, I think I might break something with it. Is there a way to do it with with the event when they switch weapons? Sorry, I wasn't clear in the initial post, what I really was trying to do was so when the user switches to that weapon (WEAPON_DEVOUR on slot2) and tries to fire, the player gets a message telling him they can't do that (I know how to do this part with client_print), and then they get switched back to the previous weapon they were using before they switched to devour.

XxAvalanchexX 03-07-2005 22:25

You won't break anything with client_PreThink. You could detect when they switch to devour and switch to a different weapon if you want to do it simply.


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

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