Help with this CP
#1

Hi guys,i created a checkpoint to blow up area69,all is working but there is a problem.

Here is the code

pawn Код:
if(checkpointid == CPs[0])
    {
      if (GetPlayerMoney(playerid) < 50000)
            {
                 SendClientMessage(playerid, 0xFFFFFF, "You need 50.000$ to bomb the Area69.");
            }
            else if(GetPlayerMoney(playerid) > 50000)
            {
                GivePlayerMoney(playerid,-50000);
                SetTimer("ExplodeArea69",25000,false);
                SendClientMessage(playerid,COLOR_RED,"*Area69 bombed! You have 25 seconds to escape!");
                new str[128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(playerid, pName, sizeof(pName));
                format(str,sizeof str,"0,4%s bombed the Area69. ",pName);
                IRC_GroupSay(IRC_Group, EchoChan,str);
            }
    }
The CP is a little bugged,i need to add a limit.

Ex: You are already bombing,please wait.

How?
Reply
#2

set a timer and on the timers callback put the explode code(what happens when the 25secs pass)
Reply
#3

add a global variable in combination with a timer..
when a player enters the checkpoint check the variable and if it's "0" then set it to "1" and start the timer + bombin and stuff..
when the variable already is at "1" it shows the wait message
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)