Add effects when I shot with a gun. [please help me]
How to add some code while I shot with guns? I've made some effects, but I don' know how to add them.
I don't know how to do this: Code:
And how to add some code while I shot only with that gun. Code:
Anyone could give me some examples, andif you have time, can you please give me a url/post all the weaopn names from half-life(not cstrike). I need this to finish my plugin. I'll give +karma If you help me. |
Re: Add effects when I shot with a gun. [please help me]
The Code Snippets/Tutorials is very helpful sometimes :wink:.
These two threads have exactly what you need. You need to hook prethink to see what button is being pushed, that is how you can determine if a client fires a weapon. http://forums.alliedmods.net/showthread.php?t=49395 http://forums.alliedmods.net/showthread.php?t=41265 Weapon List |
Re: Add effects when I shot with a gun. [please help me]
Quote:
|
Re: Add effects when I shot with a gun. [please help me]
You can find the current weapon with get_user_weapon:
http://www.amxmodx.org/funcwiki.php?go=func&id=156 and here's an example of how i would check if the player is firing a weapon Code:
|
Re: Add effects when I shot with a gun. [please help me]
thanks guys. Also if someone will be able to give me an example if the weapon is crossbow will be very good.
------------------------------------ But there are some problems, while I change my weapon the effect starts, but also works while I shot with any gun. |
Re: Add effects when I shot with a gun. [please help me]
Post your code so we can tell you what you have done incorrectly and show you the correct method.
|
Re: Add effects when I shot with a gun. [please help me]
1 Attachment(s)
ok, posted the full plugin. Plugin is not 100% done.
I still have to add: -3 effects for every power (only for some guns) -to make the teleport to work good - improve the menu |
Re: Add effects when I shot with a gun. [please help me]
Do you know the weapon numbers?
And what's wrong with the menu, and teleport? |
Re: Add effects when I shot with a gun. [please help me]
I don't know the weapon noumbers :(, and the teleport doesn't works right. It doesn't teleport to exact aimorigin - to the target.
|
Re: Add effects when I shot with a gun. [please help me]
where does it teleport you to ?
|
| All times are GMT -4. The time now is 22:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.