Countdown in TextLabel
#1

Hi guys,

I have some timers to move objects, but how can I make a countdown in a textlabel that repeats?
Can someone explain me how to, or maybe make an example?

I appreciate, thanks
Reply
#2

Bump, anyone?
Reply
#3

pawn Код:
new Countdown; //At the top of your script

public OnGameModeInit() //Or OnFilterScriptInit()
{
    Countdown = 120; //You can replace 120 with whatever time (in seconds) you want, you can use this under commands as well.
    SetTimer("Counting", 1000, true);
    return 1;
}

forward Counting();
public Counting()
{
    if(Countdown > 0)
    {
        Countdown--;
    }
    return 1;
}
If you're talking about Textdraws:
pawn Код:
TextDrawSetString(TextDraw, string); //Replace TextDraw with your text draw id
https://sampwiki.blast.hk/wiki/TextDrawSetString

If you're talking about 3D Text Labels:
pawn Код:
Update3DTextLabelText(label, color, string); //replace label and color with your desired variables.
https://sampwiki.blast.hk/wiki/Update3DTextLabelText

If you're talking about GameText:
pawn Код:
GameTextForAll(string, 1000, 5); //Or GameTextForPlayer alternatively
https://sampwiki.blast.hk/wiki/GameTextForPlayer
https://sampwiki.blast.hk/wiki/GameTextForAll

You weren't very clear in your first post about what you ACTUALLY wanted it for, so I cannot complete it for you.
Reply
#4

Thanks for your reply this really helped me a lot! +1 respect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)