count system while on robbery
#1

I want when i rob bank so they show me on my screen 30 sec count like > 30 , 29 , 28 , 27 until at the 1 and then robbery complete btw my sugest is how to add count game text on screen?

like this > http://i44.tinypic.com/4jssb8.png
Reply
#2

GameTextForPlayer?
with a timer
Reply
#3

yes look at image
Reply
#4

Use the 'search' button next time, it's there for a reason..

How to make a simple countdown
Reply
#5

i need on robbery system no cmd and i can search on ******. i will found cowtown system. but i want to know how to add on robbery.
Reply
#6

Then use the tutorial above
And I assume you're using checkpoints while robbing so, add a timer
pawn Код:
CountDownTimer = SetTimer("CountDown", 1000, false);
When the player is on the checkpoint

And adjust the Countdown Variable to 30 seconds like you said.
Reply
#7

ok so if i add this ^^ so they show to player 30, 29 , 28 until at the 0 btw i will set time to 30sec after but it's just example they show to player count?
Reply
#8

Quote:
Originally Posted by blackdragon1
Посмотреть сообщение
ok so if i add this ^^ so they show to player 30, 29 , 28 until at the 0 btw i will set time to 30sec after but it's just example they show to player count?
Not just that. Read the whole tutorial and you have to adjust a few things to your preference.
Reply
#9

Quote:
Originally Posted by Ken97
Посмотреть сообщение
Use the 'search' button next time, it's there for a reason..

How to make a simple countdown
The disadvantage of the function in the tutorial is that it can only be used once at the moment, also if their are two robberys at the same time the code gets bugged

You should use something like that
pawn Код:
forward CountDownRobbery(playerid, time);
public CountDownRobbery(playerid, time) {
    if(time < 1) {
        GameTextForPlayer(playerid, "~r~Robbery complete", 2500, 1);
    } else {
        new
            str[128]
        ;
        format(str, sizeof str, "%d seconds remaining~n~~r~Do not move until the~n~Robbery is completed", time);
        GameTextForPlayer(playerid, str, 1000, 1);

        SetTimerEx("CountDownRobbery", 1000, false, "ii", playerid, --time);
    }
}
And you simply use it like that
pawn Код:
CountDownRobbery(playerid, 30);
Reply
#10

thanks but it's going like this > 30 , 25 , 20 , 15 , 10 , 5 , robbery complete but i want like this 30 , 29 , 28 , 27 until at the 0. it depends on timer?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)