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

[NMRiH] Weapon Menu (v1.1.0, 01/13/14)


Post New Thread Reply   
 
Thread Tools Display Modes
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 11-25-2017 , 06:59   Re: [NMRiH] Weapon Menu (v1.1.0, 01/13/14)
Reply With Quote #111

Quote:
Originally Posted by EPootisMann3 View Post
Hi, I know this is a really old post but I got this error message and I seem to not know how to fix it.
L 11/25/2017 - 14:27:49: [SM] Exception reported: Invalid client index 0
L 11/25/2017 - 14:27:49: [SM] Blaming: weapon_menu_mod.smx
L 11/25/2017 - 14:27:49: [SM] Call stack trace:
L 11/25/2017 - 14:27:49: [SM] [0] IsPlayerAlive
L 11/25/2017 - 14:27:49: [SM] [1] Line 191, /home/forums/content/files/2/5/6/7/1/3/142941.attach::Command_WeaponMenu

Would be appreciated if you can help me.
I think that line just needs a few extra checks. The statements in that block comprise of handling the menu and printing a message. Maybe you're getting that error because the plugin is either displaying the menu or printing the message to a fake client or a disconnected player.

Try changing:
PHP Code:
(IsPlayerAlive(iClient)) 
to this:
PHP Code:
(IsPlayerAlive(iClient) && IsClientConnected(iClient) && (IsClientInGame(iClient) && !IsFakeClient(iClient)) 
I attached the .sp file with the changes for your convenience.
Attached Files
File Type: sp Get Plugin or Get Source (weapon_menu.sp - 740 views - 17.1 KB)
__________________
Psyk0tik is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 11-25-2017 , 08:04   Re: [NMRiH] Weapon Menu (v1.1.0, 01/13/14)
Reply With Quote #112

(IsPlayerAlive(iClient) && IsClientConnected(iClient) && (IsClientInGame(iClient) && !IsFakeClient(iClient))
it's wrong way for fixing this error
need just change to if (iClient && IsPlayerAlive(iClient))

I corrected this error as of April 22, 2016
Attached Files
File Type: sp Get Plugin or Get Source (weapon_menu_mod 1.2.2.sp - 924 views - 12.1 KB)
__________________

Last edited by Grey83; 11-25-2017 at 08:11.
Grey83 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 04-23-2020 , 05:18   Re: [NMRiH] Weapon Menu (v1.1.0, 01/13/14)
Reply With Quote #113

There will be no more updates for [NMRiH] Weapon Menu, because I created an improved analogue: [NMRiH] Equipment
__________________
Grey83 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 14:35.


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