How to remove These errors from my 1 cmd?? (rep+)
#9

pawn Код:
COMMAND:airstrike(playerid, params[])
{
    if(GetPlayerScore(playerid) < 2000) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough score, you need 2000 score");
    if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough money.");
    GivePlayerMoney(playerid,-10000);
    SendClientMessage(playerid, 0xFF0000FF, "Air Strike Successfully Done!");
    SetTimerEx("ExplodeBomb", 5000, false, "i", playerid);
    return 1;
}
forward ExplodeBomb(playerid);
public ExplodeBomb(playerid)
{
    new Float: Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    CreateExplosion(Pos[0], Pos[1], Pos[2], 7, 20.0);
    return 1;
}
@ why don't you use a timer set to 5 seconds, wtf?

@@ cjgogo, your code won't work, because the player that uses the command should have less than 2000 score.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)