Raised This Month: $ Target: $400
 0% 

Zombi Class problem(index out of bounds)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 11-26-2014 , 22:40   Re: Zombi Class problem(index out of bounds)
Reply With Quote #4

Yes, like that, though I prefer doing the check as soon as id is assigned to a value, so the plugin doesn't have to do unnecessary calculation, like:
PHP Code:
id get_user_attacker(victim)
if(
get_user_class(victim) != zClassId 
    
|| !is_user_zombie(victim
    || !
is_user_connected(id))
        return 
PLUGIN_CONTINUE 
And for the other method, here's how:
PHP Code:
g_maxplayer get_maxplayers()
if(!(
1<=id<=g_maxplayer))
        return 
PLUGIN_CONTINUE 

Last edited by RateX; 11-26-2014 at 22:40.
RateX 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 17:32.


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