Raised This Month: $ Target: $400
 0% 

Zombi Class problem(index out of bounds)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 11-27-2014 , 04:12   Re: Zombi Class problem(index out of bounds)
Reply With Quote #1

Ok,what I did:

PHP Code:
public Event_Damagevictim )
{
    new 
id
    id 
get_user_attackervictim )
    if( 
get_user_classvictim ) != zClassId 
    
|| !is_user_zombievictim 
        || !
is_user_connectedid ) )
        return 
PLUGIN_CONTINUE;

        if(!(
1<=id<=g_maxplayer))
        return 
PLUGIN_CONTINUE
    
    
new Rand random_num1100 )
    if( 
Rand && Rand <= get_pcvar_numDisarmChance ) ) 
    {
        
CantFireid ] = true
        Effects
id )
        
set_taskget_pcvar_floatDisarmTime ), "StopDisarmCc"id )
    }
    
    return 
PLUGIN_CONTINUE;

Do I need to write here in -public Event_Damage-?
PHP Code:
if(!(1<=id<=g_maxplayer))
        return 
PLUGIN_CONTINUE 

Last edited by Krtola; 11-27-2014 at 04:13.
Krtola is offline
Send a message via Skype™ to Krtola
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 17:32.


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