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;
}
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;
}
new Float:x, // top of GameMode
Float:y,
Float:z;
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED( KEY_FIRE ))
{
ICDV[playerid] = 2;
ICD[playerid] = SetTimerEx("ICountDown", 100, false, "d", playerid);
}
return 1;
}
forward ICountDown(playerid);
public ICountDown(playerid)
{
GetPlayerPos(playerid, x, y, z);
ICDV[playerid]--;
{
new str[128];
format(str,sizeof(str),"ICDV:%d | playerid:%d", ICDV[playerid], playerid);
SendClientMessageToAll(0xFFFFFFAA, str);
}
if(ICDV[playerid] == 0)
{
KillTimer(ICD[playerid]);
}
return 1;
}
ICD[playerid] = SetTimerEx("ICountDown", 100, 1, "i", "f", "f", "f", playerid, x, y, z);
ICD[playerid] = SetTimerEx("ICountDown", 100, 1, "ifff", playerid, x, y, z);
(funcname[], interval, repeating, const format[], {Float,_}:...)
Your line:
pawn Код:
pawn Код:
Код:
(funcname[], interval, repeating, const format[], {Float,_}:...) |