SetTimerEx not forwarding the correct playerid.
#1

Hey guys,
I build a timer that needs to forward the playerid, and when I test is, it gives the playerid 102 and mine is 4.

beware I defined in my script all the parameters.

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
     if (
PRESSEDKEY_FIRE ))
    {
        new
        
Float:x,
        
Float:y,
        
Float:z;
            
ICDV[playerid] = 2;
        
ICD[playerid] = SetTimerEx("ICountDown"1001"i""f""f""f"playeridxyz);
    }
    return 
1;

PHP код:
forward ICountDown(playeridxyz);
public 
ICountDown(playeridxyz)
{
    
ICDV[playerid]--;
    new 
str[128]; // for testing the bug
    
format(str,sizeof(str),"ICDV:%d | playerid:%d"ICDV[playerid], playerid); // for testing the bug
    
SendClientMessageToAll(LightBluestr); // for testing the bug
    
if(ICDV[playerid] == 0)
    {
        
KillTimer(ICD[playerid]);
    }
    return 
1;

Someone knows why it sends me the playerid 102 and not my playerid 4?
Thanks for the help =)
Reply


Messages In This Thread
SetTimerEx not forwarding the correct playerid. - by techg9 - 27.04.2013, 12:30
Re: SetTimerEx not forwarding the correct playerid. - by PT - 27.04.2013, 13:56
Re: SetTimerEx not forwarding the correct playerid. - by MattyG - 27.04.2013, 14:28
Re: SetTimerEx not forwarding the correct playerid. - by techg9 - 27.04.2013, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)