SA-MP Forums Archive
3d countdown - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3d countdown (/showthread.php?tid=571548)



3d countdown - Bondage - 19.04.2015

hello
i would like to do some 3d countdown, can anyone please give a 3d count if ya got?


Re: 3d countdown - Fel486 - 19.04.2015

Sorry, could just have with streamer. Didn't test.

pawn Код:
forward counter();

Text3D:txt;
new str[100];
new timer;
new number = 10;

txt = CreateDynamic3DTextLabel("", -1, x, y, z, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 20);

public counter()
{
    if(number == 0) KillTimer(timer);
    else
    {
        format(str, sizeof(str), "%d", number);
        number--;
        UpdateDynamic3DTextLabelText(txt, -1, str);
    }
}

public OnGameModeInit()
{
    timer = SetTimer("counter", 1000, true);
}