Textdraw
#1

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
Reply
#2

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);
Reply
#3

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
Reply
#4

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

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);
Reply
#6

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;
}
Reply
#7

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.
Reply
#8

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?
Reply
#9

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).
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)