27.04.2013, 12:30
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.
Someone knows why it sends me the playerid 102 and not my playerid 4?
Thanks for the help =)
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(playerid, newkeys, oldkeys)
{
if (PRESSED( KEY_FIRE ))
{
new
Float:x,
Float:y,
Float:z;
ICDV[playerid] = 2;
ICD[playerid] = SetTimerEx("ICountDown", 100, 1, "i", "f", "f", "f", playerid, x, y, z);
}
return 1;
}
PHP код:
forward ICountDown(playerid, x, y, z);
public ICountDown(playerid, x, y, z)
{
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(LightBlue, str); // for testing the bug
if(ICDV[playerid] == 0)
{
KillTimer(ICD[playerid]);
}
return 1;
}
Thanks for the help =)