Bomb code help
#4

pawn Код:
new Float:BombPos[MAX_PLAYERS][3];
pawn Код:
if(strcmp("/plant",cmdtext, true) == 0)
{
    if(plantada[playerid] == 0 && detonada[playerid] == 0)
    {
        SendClientMessageToAll(0xFF000000, "The bomb has been planted");
        plantada[playerid]=1;
        GetPlayerPos(playerid, BombPos[playerid][0], BombPos[playerid][1], BombPos[playerid][2]);
    }
    else if(plantada[playerid] == 1)
    {
        SendClientMessage(playerid, 0xFF000000, "You cannot plant the bomb, cuz it's already planted");
    }
    return 1;
}

if(strcmp("/detone",cmdtext, true) == 0)
{
    if(detonada[playerid] == 0 && plantada[playerid] == 1)
    {
        CreateExplosion(BombPos[playerid][0], BombPos[playerid][1], BombPos[playerid][2], 7, 100);
        SendClientMessageToAll(0xFF000000, "The bomb has been detoned");
        plantada[playerid]=0;
        detonada[playerid]=1;
    }
    else if(plantada[playerid] == 0 && detonada[playerid] == 1)
    {
        SendClientMessage(playerid, 0xFF000000, "The bomb hasn't been planted yet");
    }
    return 1;
}
Reply


Messages In This Thread
Bomb code help - by blackwave - 18.11.2010, 14:58
Re: Bomb code help - by blackwave - 18.11.2010, 18:16
Re: Bomb code help - by WillyP - 18.11.2010, 18:26
Re: Bomb code help - by MadeMan - 18.11.2010, 18:45
Re: Bomb code help - by blackwave - 18.11.2010, 18:59
Re: Bomb code help - by dark_clown - 18.11.2010, 19:51

Forum Jump:


Users browsing this thread: 1 Guest(s)