[DUV]Como Fazer o Player Perder Life ao Usar o C-BUG
#5

Ah tб sу conheзo ele por Bug Deagle ou da Eagle :S

Topo GM
pawn Код:
#define CLICANDO(%0) \
    (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
new TimerBug[500];
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(GetPlayerWeapon(playerid) == 24 && CLICANDO(KEY_FIRE))
    {
        SetPVarInt(playerid,"UsandoBug",10);
        TimerBug[playerid] = SetTimerEx("Tempo",1000,0,"i",playerid);
    }
    if(GetPVarInt(playerid,"UsandoBug") == 10 && newkeys != KEY_FIRE && newkeys & KEY_CROUCH)
    {
        SendClientMessage(playerid,COLOR,"Nгo use Bug da Eagle");
        SetPlayerHealth(playerid, -40);//sу mudar o 40 pra o nъmero que quiser ;D
        SetPVarInt(playerid,"UsandoBug",0);
        KillTimer(TimerBug[playerid]);
    }
    return true;
}
Bem no final finalzin...
pawn Код:
forward Tempo(playerid);
public Tempo(playerid)
{
    SetPVarInt(playerid,"UsandoBug",10);
    return true;
}
Crйditos: [iPs]DraKINs e [iPs]Av4stizin riariariariaria
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)