Quote:
Originally Posted by Man43
Ok look I've created it like this
PHP код:
forward OneSecTimer(playerid);
public OneSecTimer(playerid)
{
if(colorchanged[playerid] == COLOR_WHITE)
{
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);
and not work why
|
Well that's not a one second, try like this
PHP код:
SetTimerEx("OneSecTimer", 1000, true, "i", playerid);
If that doesn't work show me the server_log ( crashdetect mybe )
EDIT: Add the player's color in that command ( colorchange[playerid] = WHITE_COLOR; )