pawn Код:
#define Verde 0x00FF00FF
#define Roxo 0x8000FFFF
new Piscando[MAX_PLAYERS];
CMD:piscar(playerid) {
if (!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, -1, "Vocк nгo й Administrador!");
Piscando[playerid] = SetTimerEx("FuncPiscar", 1000, false, "i", playerid);
return true;
}
CMD:parardepiscar(playerid) {
if(!Piscando[playerid])
return SendClientMessage(playerid, -1, "Vocк nгo esta piscando!");
KillTimer(Piscando[playerid]);
SetPlayerColor(playerid, Verde);
SendClientMessage(playerid, -1, "Vocк parou de piscar!");
return true;
}
forward FuncPiscar(id);
public FuncPiscar(id) {
if (GetPlayerColor(id) == Roxo) {
SetPlayerColor(id, Verde);
SetTimerEx("FuncPiscar", 1000, false, "i", id);
}
else {
SetPlayerColor(id, Roxo);
SetTimerEx("FuncPiscar", 1000, false, "i", id);
}
return true;
}
public OnPlayerDisconnect(playerid, reason) {
Piscando[playerid] = 0;
return true;
}