- /bomb - 5 second delay
#1

Well I've been working on my first ever script & from scratch and I've stumbled into a problem

pawn Код:
if(strcmp("/bomb", cmdtext, true, 10) == 0) {//Explosion
        if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid,_COLOR_GREY,"You need $2,500 for this!");
        if (gTeam[playerid] == TEAM_TERRORIST) {
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        CreateExplosion(X,Y,Z,6,40.0);
        SetPlayerHealth(playerid, 0.0);
        GivePlayerMoney(playerid, -500);
        GameTextForPlayer(playerid,"~r~SUPRISE BLOWUP!",2500,5);
        SendClientMessage(playerid, _COLOR_RED, "You commited suicide and lost an extra $500!");}
        return 1;
How would I go on and give it a 5 second delay before it is typed again to prevent abuse when they die and such, thanks in advance.

ALSO -
How would I make it so when they press a dialog -
pawn Код:
if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,_COLOR_GREY,"You cannot afford this!");
                {
                    SetPlayerArmour(playerid, 100);
                    GivePlayerMoney(playerid, -2000);
                    SendClientMessage(playerid, _COLOR_CYAN, "* You have choosen a Kevlar Vest!");
                    return 0;
It sends anyone close a message (Yes, using proxdetector but I haven't understood it yet) - for the purpose of determining a weapon hacker from a legit buyer.
Reply


Messages In This Thread
- /bomb - 5 second delay - by Darklom - 18.12.2010, 04:32
Re: - /bomb - 5 second delay - by Biesmen - 18.12.2010, 07:39
Re: - /bomb - 5 second delay - by Darklom - 18.12.2010, 17:48
Re: - /bomb - 5 second delay - by Yummy - 18.12.2010, 18:53

Forum Jump:


Users browsing this thread: 1 Guest(s)