SA-MP Forums Archive
how to textdraw countdown to the bottom?? - 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: how to textdraw countdown to the bottom?? (/showthread.php?tid=548902)



how to textdraw countdown to the bottom?? - quochuy7915 - 03.12.2014

how to textdraw countdown to the bottom??
My code: http://pastebin.com/fNcta2RV
no place to edit TextDraw
I need your help me



Re: how to textdraw countdown to the bottom?? - JeaSon - 03.12.2014

well you can do that with this like

~n~ this means new line ~n~

try this

pawn Код:
//Commands//
CMD:countdown(playerid,params[])
{
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
        if(Count == 0)
        {
                SetTimer("Counting",1000,false);
                }
                else
                {
                        SendClientMessage(playerid, 0xFF0000FF,"Someone else has already started a Countdown!");
        }
        if(IsPlayerInRangeOfPoint(playerid, RANGEOFSTARTER, x, y, z))
        {
                TogglePlayerControllable(playerid, 0);
        }
        return 1;
}
public Counting(playerid)
{
        Count = 1;
        GameTextForAll("~r~3",1000,6);
    PlayerPlaySound(playerid, 1056,0,0,0);
        SetTimer("Counting2",1000,false);
        return 1;
}
public Counting2(playerid)
{
        Count = 1;
        GameTextForAll("~n~~n~~n~~y~2",1000,6);
    PlayerPlaySound(playerid, 1056,0,0,0);
        SetTimer("Counting1",1000,false);
        return 1;
}
public Counting1(playerid)
{
        Count = 1;
        GameTextForAll("~n~~n~~n~~b~1",1000,6);
    PlayerPlaySound(playerid, 1056,0,0,0);
        SetTimer("CountingGO",1000,false);
        return 1;
}
public CountingGO(playerid)
{
        Count = 0;
    PlayerPlaySound(playerid, 1057,0,0,0);
        GameTextForAll("~n~~n~~n~~g~GO!!!",1000,6);
    TogglePlayerControllable(playerid, 1);
        return 1;
}



Re: how to textdraw countdown to the bottom?? - quochuy7915 - 03.12.2014

Quote:
Originally Posted by Namer
Посмотреть сообщение
well you can do that with this like

~n~ this means new line ~n~

try this

pawn Код:
//Commands//
CMD:countdown(playerid,params[])
{
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
        if(Count == 0)
        {
                SetTimer("Counting",1000,false);
                }
                else
                {
                        SendClientMessage(playerid, 0xFF0000FF,"Someone else has already started a Countdown!");
        }
        if(IsPlayerInRangeOfPoint(playerid, RANGEOFSTARTER, x, y, z))
        {
                TogglePlayerControllable(playerid, 0);
        }
        return 1;
}
public Counting(playerid)
{
        Count = 1;
        GameTextForAll("~r~3",1000,6);
    PlayerPlaySound(playerid, 1056,0,0,0);
        SetTimer("Counting2",1000,false);
        return 1;
}
public Counting2(playerid)
{
        Count = 1;
        GameTextForAll("~n~~n~~n~~y~2",1000,6);
    PlayerPlaySound(playerid, 1056,0,0,0);
        SetTimer("Counting1",1000,false);
        return 1;
}
public Counting1(playerid)
{
        Count = 1;
        GameTextForAll("~n~~n~~n~~b~1",1000,6);
    PlayerPlaySound(playerid, 1056,0,0,0);
        SetTimer("CountingGO",1000,false);
        return 1;
}
public CountingGO(playerid)
{
        Count = 0;
    PlayerPlaySound(playerid, 1057,0,0,0);
        GameTextForAll("~n~~n~~n~~g~GO!!!",1000,6);
    TogglePlayerControllable(playerid, 1);
        return 1;
}
What you edit lines, I see the same
OK tks this work


Re: how to textdraw countdown to the bottom?? - JeaSon - 03.12.2014

" GameTextForAll " i edited that

look on urs then mine

yours
pawn Код:
GameTextForAll("~y~2",1000,6);
mine
pawn Код:
GameTextForAll("~n~~n~~n~~y~2",1000,6);



Re: how to textdraw countdown to the bottom?? - quochuy7915 - 03.12.2014

Quote:
Originally Posted by Namer
Посмотреть сообщение
" GameTextForAll " i edited that

look on urs then mine

yours
pawn Код:
GameTextForAll("~y~2",1000,6);
mine
pawn Код:
GameTextForAll("~n~~n~~n~~y~2",1000,6);
Thanks this work


Re: how to textdraw countdown to the bottom?? - quochuy7915 - 03.12.2014

Quote:
Originally Posted by Namer
Посмотреть сообщение
" GameTextForAll " i edited that

look on urs then mine

yours
pawn Код:
GameTextForAll("~y~2",1000,6);
mine
pawn Код:
GameTextForAll("~n~~n~~n~~y~2",1000,6);

What this how to fix


Re: how to textdraw countdown to the bottom?? - BroZeus - 03.12.2014

try this line --
pawn Код:
GameTextForAll(" ~n~  ~n~  ~n~  ~y~2",1000,6);//note the space



Re: how to textdraw countdown to the bottom?? - quochuy7915 - 03.12.2014

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
try this line --
pawn Код:
GameTextForAll(" ~n~  ~n~  ~n~  ~y~2",1000,6);//note the space
Thanks bro +Rep