[Ajuda] Comando Bomba Atфmica
#2

vou tentar fazer algo aqui meio corrido
pawn Code:
//topo do gm cria a variбvel
new ExplodirBombaEm[MAX_PLAYERS];
new timerbombaatomica[MAX_PLAYERS];

//OnPlayerConnect
ExplodirBombaEm[playerid] = 0;

COMMAND:bombaa(playerid, params[])
{
     new AdminName[24], don[250];
    SendAdminText(playerid, "usou /bombaa", params);
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] >= 5)
        {
            for (new i; i < MAX_PLAYERS; i++)
                if (IsPlayerConnected(i))
    GetPlayerName(playerid, AdminName, sizeof(AdminName));
    format(don, sizeof(don), "{a9c4e4}O Administrador {FFFFFF}%s {a4c4e4} matou todos o jogadores online!", AdminName);
    SendClientMessageToAll(-1, don);
ExplodirBombaEm[playerid] = 3;
timerbombaatomica[playerid] = SetTimerEx("BombaAtomica", 1000, true, "i", playerid);
        }
        else
        return 0;
    }
    else
        return 0;
    return 1;
}

//em algum local
forward BombaAtomica(playerid);
public BombaAtomica(playerid)
{
            for (new i; i < MAX_PLAYERS; i++)
                if (IsPlayerConnected(i))
if(ExplodirBombaEm[playerid] <= 3)
{
new str[100];
format(str, sizeof(str), "Bomba atфmica em %d !", ExplodirBombaEm[playerid]);
SendClientMessageToAll(-1, str);
ExplodirBombaEm[playerid] ++;
}
else if(ExplodirBombaEm[playerid] == 3)
{
ExplodirBombaEm[playerid] = 0;
SetPlayerHealth(i, 0.0);
new Float:x[MAX_PLAYERS], Float:y[MAX_PLAYERS], Float:z[MAX_PLAYERS];
GetPlayerPos(i, x[i], y[i], z[i]);
CreateExplosion(x[i], y[i], z[i], 3, 1000);
SendClientMessageToAll(-1, "BOOOOOOOOOOOOOOOOOM");
KillTimer(timerbombaatomica[playerid]);
}
}
return 1;
}
tenta algo assim
Reply


Messages In This Thread
Comando Bomba Atфmica - by jdsfenix - 29.04.2014, 04:03
Re: Comando Bomba Atфmica - by hard_dalzot - 29.04.2014, 04:18
Re: Comando Bomba Atфmica - by jdsfenix - 29.04.2014, 04:33
Re: Comando Bomba Atфmica - by hard_dalzot - 29.04.2014, 04:35
Re: Comando Bomba Atфmica - by jdsfenix - 29.04.2014, 04:39
Re: Comando Bomba Atфmica - by hard_dalzot - 29.04.2014, 04:45
Re: Comando Bomba Atфmica - by Caio_Freeze - 29.04.2014, 04:48
Re: Comando Bomba Atфmica - by jdsfenix - 29.04.2014, 04:58
Re: Comando Bomba Atфmica - by hard_dalzot - 29.04.2014, 05:00
Re: Comando Bomba Atфmica - by hard_dalzot - 29.04.2014, 05:06

Forum Jump:


Users browsing this thread: 1 Guest(s)