Raised This Month: $ Target: $400
 0% 

Player out of Range


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
InteX01
Senior Member
Join Date: Jan 2017
Old 07-01-2017 , 09:14   Re: Player out of Range
Reply With Quote #1

Didnt know it can make errors like this
InteX01 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-01-2017 , 11:32   Re: Player out of Range
Reply With Quote #2

Quote:
Originally Posted by InteX01 View Post
Didnt know it can make errors like this
It's not obvious based on the name of the native, but is_user_alive() has a check for a valid player id range.
Code:
static cell AMX_NATIVE_CALL is_user_alive(AMX *amx, cell *params) /* 1 param */
{
	int index = params[1];
	
	if (index < 1 || index > gpGlobals->maxClients)
	{
		return 0;
	}
	...
You should have checking in place before calling vip_brzina(id) and svip_brzina(id)
__________________

Last edited by Bugsy; 07-01-2017 at 11:33.
Bugsy 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 23:04.


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