[Ajuda] Segundos no Comando /PlantarBomba
#8

Basta testar...

pawn Код:
if(!strcmp(cmd, "/PlantarBomba", true))
{
    if(BombaPlanted[playerid])
        return SendClientMessage(playerid, ERRO, "Vocк sу pode plantar uma bomba de cada vez.");
       
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        return SendClientMessage(playerid, ERRO, "Use /plantarbomba [Segundos]");
       
    GetPlayerPos(playerid, BombaX[playerid], BombaY[playerid], BombaZ[playerid]);
    GetXYInFrontOfPlayer(playerid, BombaX[playerid], BombaY[playerid], 0.7);
    SendClientMessage(playerid, INFO, "Bomba Plantada!");
    SendClientMessage(playerid, INFOA, "[INFO] Para desativar use ( /DesativarBomba )");
    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
    BombaObject[playerid] = CreateObject(1252, BombaX[playerid], BombaY[playerid], BombaZ[playerid] - 0.8,270,0,0);
    bombatempo[playerid] = SetTimerEx("BombaTempo", 1000 * strval(tmp), 0, "d", playerid);
    BombaArmed[playerid] = true;
    return 1;
}

// public
public BombaTempo(playerid)
{
    CreateExplosion(BombaX[playerid], BombaY[playerid], BombaZ[playerid], 10, 15);
    SendClientMessage(playerid, -1, "Bomba detonada ! (Agora vocк pode plantar outra!)");
    DestroyObject(BombaObject[playerid]);
    BombaArmed[playerid] = false;
    return 1;
}
Reply


Messages In This Thread
Segundos no Comando /PlantarBomba - by _iLinux_ - 10.07.2012, 19:36
Re: Segundos no Comando /PlantarBomba - by @Riichard - 10.07.2012, 19:49
Re: Segundos no Comando /PlantarBomba - by _iLinux_ - 10.07.2012, 20:49
Re: Segundos no Comando /PlantarBomba - by _iLinux_ - 11.07.2012, 14:16
Re: Segundos no Comando /PlantarBomba - by andmeida10 - 11.07.2012, 16:40
Re: Segundos no Comando /PlantarBomba - by _iLinux_ - 11.07.2012, 23:44
Re: Segundos no Comando /PlantarBomba - by andmeida10 - 12.07.2012, 09:37
Re: Segundos no Comando /PlantarBomba - by Jason` - 12.07.2012, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)