Hide Draw Text?
#1

Hey.. wanted to know if there's any chance I can hide for a player the whole text draws?

I'll expalin.. I've made that every place you enter (interior) you're getting a textdraw of the place name.. and if an admin teleporting to another player he sticks with the old place textdraw..
Reply
#2

Try

pawn Код:
TextDrawHideForPlayer(playerid, [here put the textdraw string]);
Reply
#3

Yea... well I know that?
my problem is how I hide ALL the textdraws..

I thought about adding all the textdraws and hide each but I want to know if there's option just to hide all
Reply
#4

Example of personal textdraw:

below main() FUNCTION
pawn Код:
new Text:Textdraw1[MAX_PLAYERS];
in

pawn Код:
public OnPlayerConnect(playerid)
Textdraw1[playerid] = TextDrawCreate(etcetc...
Just copy the textdraw from gamemodeinit and move it to OnPlayerConnect and add one [playerid] next to the textdraw id example:

pawn Код:
Textdraw1[playerid]
Reply
#5

You're saying thing I know.. and its not what I need..

I need to remove ALL the text draws when player using a command
Reply
#6

ah just add them multiple times

Example if using strcmp

pawn Код:
if(strcmp(cmd, "/hidetds", true) == 0)
{
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    SendClientMessage(playerid, -1, "You hided all the textdraws.");
    return 1;
}
if you are using ZCMD

pawn Код:
CMD:hidetds(playerid, params[])
{
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    SendClientMessage(playerid, -1, "You hided all the textdraws.");
    return 1;
}
at the end of your script.

NOTE: You cannot add them all with just one line, in the place of textdraw1,2 and 3 of mine replace them with your own ones or add more lines if you want more.
Reply
#7

I know you're trying to help man.. but I said I dont want to put all of them.. I have a lot and I even didnt finish add all..

I asked if there's option in one line to do it instead of put hide each..
Reply
#8

well in just one line you can't hide 2 textdraws


aside for playertextdraws on each player you can also use the hiding textdraw for all players in the server

Example:

in place of

pawn Код:
TextDrawHideForPlayer
add


pawn Код:
TextDrawHideForAll
Reply
#9

He wants to hide all in one function...

Create a stock and use that.
Reply
#10

Just use a loop, duh ..
pawn Код:
for(new i; i < 2048; i++)
{
    TextDrawHideForPlayer(playerid, _:i);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)