[Pedido] Cor Piscando
#5

Quote:
Originally Posted by iCasTiel
Посмотреть сообщение
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;

}
Valeu Ajudou REP +
Reply


Messages In This Thread
Cor Piscando - by SubZeroo - 27.07.2013, 19:38
Re: Cor Piscando - by MonFiTy - 27.07.2013, 19:50
Re: Cor Piscando - by Standby - 27.07.2013, 19:54
Re: Cor Piscando - by Gii - 27.07.2013, 19:58
Re: Cor Piscando - by SubZeroo - 27.07.2013, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)