SA-MP Forums Archive
Textdraw - 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: Textdraw (/showthread.php?tid=502251)



Textdraw - TLN - 23.03.2014

pawn Код:
format(RobberyText, sizeof(RobberyText), "~r~Robbery ~w~In ~g~Progress ~w~~n~Stay In The ~y~24/7");
How the textdraw is supposed to be:
Robbery In Progress
Stay In The 24/7

How it is:
Robbery
In
Progress
Stay
In
The
24/7



Re: Textdraw - [..MonTaNa..] - 23.03.2014

pawn Код:
GameTextForPlayer(playerid, "~r~Robbery ~w~In ~g~Progress ~w~~n~Stay In The ~y~24/7", 3500, 3);
or

pawn Код:
public OnGameModeInit()
{
    // your Textdraws
    return 1;
}

// In the robbery command
TextDrawShowForPlayer(playerid, Textdraw);



Re: Textdraw - TLN - 23.03.2014

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
pawn Код:
GameTextForPlayer(playerid, "~r~Robbery ~w~In ~g~Progress ~w~~n~Stay In The ~y~24/7", 3500, 3);
or

pawn Код:
public OnGameModeInit()
{
    // your Textdraws
    return 1;
}

// In the robbery command
TextDrawShowForPlayer(playerid, Textdraw);
I'm not going to use gametext. (._.)
That's exactly what I did, but it's like this, as I wrote in the thread:
Robbery
In
Progress
Stay
In
The
24/7


instead of
Robbery In Progress
Stay In The 24/7



Re: Textdraw - [..MonTaNa..] - 23.03.2014

Oh well, you formatted the message which you don't need so..


Re: Textdraw - TLN - 23.03.2014

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
Oh well, you formatted the message which you don't need so..
https://sampwiki.blast.hk/wiki/TextDrawSetString
pawn Код:
new RobberyText[80];
    format(RobberyText, sizeof(RobberyText), "~r~Robbery ~w~In ~g~Progress ~w~ ~n~Stay In The ~y~24/7");
    TextDrawSetString(TextMessage, RobberyText);



Re: Textdraw - [..MonTaNa..] - 23.03.2014

I just told you that you don't need to format the message,

pawn Код:
public OnGameModeInit()
{

    RobberyText = TextDrawCreate(247.000000, 226.000000, "~r~Robbery ~w~In ~g~Progress ~w~ ~n~Stay In The ~y~24/7");
    TextDrawBackgroundColor(RobberyText, 255);
    TextDrawFont(RobberyText, 1);
    TextDrawLetterSize(RobberyText, 0.309899, 1.199900);
    TextDrawColor(RobberyText, -1);
    TextDrawSetOutline(RobberyText, 0);
    TextDrawSetProportional(RobberyText, 1);
    TextDrawSetShadow(RobberyText, 1);
    TextDrawSetSelectable(RobberyText, 0);
    return 1;
}

CMD:robbery(playerid, params[])
{
    TextDrawShowForPlayer(playerid, RobberyText);
    return 1;
}



Re: Textdraw - TLN - 23.03.2014

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
I just told you that you don't need to format the message,

pawn Код:
public OnGameModeInit()
{

    RobberyText = TextDrawCreate(247.000000, 226.000000, "~r~Robbery ~w~In ~g~Progress ~w~ ~n~Stay In The ~y~24/7");
    TextDrawBackgroundColor(RobberyText, 255);
    TextDrawFont(RobberyText, 1);
    TextDrawLetterSize(RobberyText, 0.309899, 1.199900);
    TextDrawColor(RobberyText, -1);
    TextDrawSetOutline(RobberyText, 0);
    TextDrawSetProportional(RobberyText, 1);
    TextDrawSetShadow(RobberyText, 1);
    TextDrawSetSelectable(RobberyText, 0);
    return 1;
}

CMD:robbery(playerid, params[])
{
    TextDrawShowForPlayer(playerid, RobberyText);
    return 1;
}
Is that really needed? I have a lot of shit to rob.
I'll just remove ~n~ instead then, not going to add so many textdraws.


Re: Textdraw - DerickClark - 23.03.2014

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
I just told you that you don't need to format the message,

pawn Код:
public OnGameModeInit()
{

    RobberyText = TextDrawCreate(247.000000, 226.000000, "~r~Robbery ~w~In ~g~Progress ~w~ ~n~Stay In The ~y~24/7");
    TextDrawBackgroundColor(RobberyText, 255);
    TextDrawFont(RobberyText, 1);
    TextDrawLetterSize(RobberyText, 0.309899, 1.199900);
    TextDrawColor(RobberyText, -1);
    TextDrawSetOutline(RobberyText, 0);
    TextDrawSetProportional(RobberyText, 1);
    TextDrawSetShadow(RobberyText, 1);
    TextDrawSetSelectable(RobberyText, 0);
    return 1;
}

CMD:robbery(playerid, params[])
{
    TextDrawShowForPlayer(playerid, RobberyText);
    return 1;
}
Maybe your sized?


Re: Textdraw - [..MonTaNa..] - 23.03.2014

Try it out, I am sure that it'll solve your problem.

If you have other stores to rob, continue to create them in the same way

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
TextDrawSetSelectable(RobberyText, 0);?
It sets it to 0 so he don't need to worry about it, or he can just remove it if he want (that was just an example).


Re: Textdraw - TLN - 23.03.2014

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
Try it out, I am sure that it'll solve your problem.

If you have other stores to rob, continue to create them in the same way



It sets it to 0 so he don't need to worry about it, or he can just remove it if he want (that was just an example).
I really don't want to add 1 textdraw for each store thanks for trying.