13.08.2018, 00:03
Ok look I've created it like this
and not work why
PHP код:
forward OneSecTimer(playerid);
public OneSecTimer(playerid)
{
if(colorchanged[playerid] == COLOR_WHITE) // this is a player variable so u create it like this "new color1[MAX_PLAYERS];"
{
SetPlayerColor(playerid, COLOR_BLACK);
colorchanged[playerid] = COLOR_WHITE;
}
else if(colorchanged[playerid] == COLOR_WHITE)
{
SetPlayerColor(playerid, COLOR_BLACK);
colorchanged[playerid] = COLOR_WHITE;
}
return 1;
}
//I've added this timer into the command
SetTimerEx("OneSecTimer", 100, true, "i", ID);