Raised This Month: $ Target: $400
 0% 

Invalid player errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-05-2013 , 14:15   Re: Invalid player errors
Reply With Quote #2

zp_core_infect native
if you see the native, you see that this happens only if player is died. with your VICTIM_ID is dead.
PHP Code:

public native_core_infect(plugin_idnum_params)
{
    new 
id get_param(1)
    
    if (!
is_user_alive(id))
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Invalid Player (%d)"id)
        return 
false;
    }
    
    if (
flag_get(g_IsZombieid))
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Player already infected (%d)"id)
        return 
false;
    }
    
    new 
attacker get_param(2)
    
    
InfectPlayer(idattacker)
    return 
true;

you can try before turning to zombie check
PHP Code:
if(is_user_alive(victim))
{
        
// Turn into zombie
        
zp_core_infect(victimattacker// 332 line
}
else
{
        continue;

why you need to double check if is_user_alive i can't answer.. maybe cause from first line to this line passed a some time when player get killed..
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 01-05-2013 at 14:31.
AngeIII is offline
Send a message via Skype™ to AngeIII
 



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 13:38.


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