Hide Draw Text? -
Qur - 20.07.2012
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..
Re: Hide Draw Text? -
L.Hudson - 20.07.2012
Try
pawn Код:
TextDrawHideForPlayer(playerid, [here put the textdraw string]);
Re: Hide Draw Text? -
Qur - 20.07.2012
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
Re: Hide Draw Text? -
L.Hudson - 20.07.2012
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:
Re: Hide Draw Text? -
Qur - 20.07.2012
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
Re: Hide Draw Text? -
L.Hudson - 20.07.2012
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.
Re: Hide Draw Text? -
Qur - 20.07.2012
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..
Re: Hide Draw Text? -
L.Hudson - 20.07.2012
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
add
Re: Hide Draw Text? -
tyler12 - 20.07.2012
He wants to hide all in one function...
Create a stock and use that.
Re: Hide Draw Text? -
Vince - 20.07.2012
Just use a loop, duh ..
pawn Код:
for(new i; i < 2048; i++)
{
TextDrawHideForPlayer(playerid, _:i);
}