Raised This Month: $ Target: $400
 0% 

Solved cs_get_weapon_ammo returning "Non-player entity"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-07-2021 , 03:14   Re: cs_get_weapon_ammo returning "Non-player entity"
Reply With Quote #3

No, it shouldn't. Pass the weapon ENTITY index. CHECK_NONPLAYER checks to make sure the entity you passed is not a player. The error message is correct, you passed id = 1 whicb is a player id and the native does not want that.

Based on "eventid" you know for which weapon the forward was triggered(you can deduce the CSW_* index). With the csw index you can retrieve the weapon entity index.

Also, what is "iPlayer"? In the forward header you have "id".
__________________

Last edited by HamletEagle; 08-07-2021 at 03:16.
HamletEagle is offline
 



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 02:32.


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