Raised This Month: $51 Target: $400
 12% 

get_userweapon error "invalid weapon id 0"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ricky
Senior Member
Join Date: Jul 2005
Old 09-14-2017 , 19:26   get_userweapon error "invalid weapon id 0"
Reply With Quote #1

I have an issue with this log error, "invalid weapon id 0". I think the error comes up when you kill someone with a non native weapon and I want to figure out a way to check and return with an if statement if the weapon is invalid. What would you put here?

Code:
public player_diePost(arg[])
{
new szWeapon[24]
new iKiller = arg[1]
//if(??) return PLUGIN_CONTINUE
get_weaponname(arg[3], szWeapon, 23)
replace(szWeapon, 23, "weapon_", "")

do_deathmsg(iKiller, arg[0], arg[2], szWeapon)
}
Ricky is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-14-2017 , 20:07   Re: get_userweapon error "invalid weapon id 0"
Reply With Quote #2

you retrieving the arguments wrongly...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-16-2017 , 16:56   Re: get_userweapon error "invalid weapon id 0"
Reply With Quote #3

What? This code doesn't make sense.
__________________








CrazY. is offline
Reply



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 15:57.


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