Raised This Month: $77 Target: $400
 19% 

Something special for ONE weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
supertimor
Member
Join Date: Sep 2017
Old 06-16-2019 , 18:19   Something special for ONE weapon
Reply With Quote #1

Hi,
I was wondering if someone can help me with plugin, where player can buy for example p250 shooting bullets with zeus tracer. It's simple, but what if I want to make THIS (not kind of) weapon to do this? I mean if player will drop this weapon, and someone will take this - he will gain all of special abillities that this weapon do.

So player can buy p250 with for example only primary ammo, so 13 bullets can shoot with tracer from
\/
https://forums.alliedmods.net/showthread.php?p=2501632
If someone will drop this weapon, it will work for all of this weapon ammo, but won't work with any other p250.

I just don't know how to "grab" it, I can easily convert this plugin to work if i'll get idea..
Thanks in advance!
supertimor is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 06-16-2019 , 19:23   Re: Something special for ONE weapon
Reply With Quote #2

Creating weapon via CreateEntityByName, then change classname to custom via DispatchKeyValue.
On weapon fire event get classname if equal custom = tracer.

Last edited by farawayf; 06-16-2019 at 19:28.
farawayf is offline
Mesharsky How2Kill
Junior Member
Join Date: May 2017
Old 06-17-2019 , 12:51   Re: Something special for ONE weapon
Reply With Quote #3

Quote:
Originally Posted by farawayf View Post
Creating weapon via CreateEntityByName, then change classname to custom via DispatchKeyValue.
On weapon fire event get classname if equal custom = tracer.
So at the same way as far as i see the documentation, the attributes for specific weapon should save after he drops that weapon using DispatchKeyValue? And the other guy who pick it up, have same weapon as a guy who drops it?

Well, interesting
Mesharsky How2Kill is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 06-17-2019 , 13:10   Re: Something special for ONE weapon
Reply With Quote #4

Quote:
Originally Posted by Mesharsky How2Kill View Post
So at the same way as far as i see the documentation, the attributes for specific weapon should save after he drops that weapon using DispatchKeyValue? And the other guy who pick it up, have same weapon as a guy who drops it?

Well, interesting
exactly
farawayf is offline
supertimor
Member
Join Date: Sep 2017
Old 06-18-2019 , 07:20   Re: Something special for ONE weapon
Reply With Quote #5

Yes, of course its true. That was good idea, it works perfectly ;)
thanks mate!

Last edited by supertimor; 06-18-2019 at 07:20.
supertimor is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:33.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode