Raised This Month: $ Target: $400
 0% 

Knife Models [XP System & Skills Support]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-28-2021 , 14:08   Re: Knife Models [XP System & Skills Support]
Reply With Quote #11

You can get the user's current knife name:

PHP Code:
new szKnife[32]
crxknives_get_attribute_str(id"NAME"szKnifecharsmax(szKnife))

if(
equal(szKnife"Drednova"))
{
    
// your code here...

Actually now that I looked at my code again, I found out I did actually include the native you originally needed. It's the same one as above, but setting the last argument to "false" will treat the id as a knife index instead of player index. Check the documentation here - https://amxx-bg.info/api/crxknives/c..._attribute_str

But for your case it's better to directly get the user's knife name just like shown in the code above.

PS: you might wanna consider checking if the knife has a certain attribute instead of hardcoding the abilities. This way you can use the same ability on other knives and/or with different values.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
 


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 07:36.


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