Textdraw help. -
mkmk - 27.10.2014
Well I have a textdraw, but it doesn't disappear lol.
I get no errors, but here's the code - when I get IG the text appears and says "Loading..." But it just doesn't go away lmao.
pawn Код:
stock LoadTextdraws()
{
StopAnim = TextDrawCreate(610.0, 400.0,
"~r~~k~~PED_SPRINT~ ~w~to stop the animation");
TextDrawUseBox(StopAnim, 0);
TextDrawFont(StopAnim, 2);
TextDrawSetShadow(StopAnim,0);
TextDrawSetOutline(StopAnim,1);
TextDrawBackgroundColor(StopAnim,0x000000FF);
TextDrawColor(StopAnim,0xFFFFFFFF);
TextDrawAlignment(StopAnim,3);
BoxNotice = TextDrawCreate(174.000000, 181.000000, "Box");
TextDrawBackgroundColor(BoxNotice, 0);
TextDrawFont(BoxNotice, 1);
TextDrawLetterSize(BoxNotice, 1.590000, 7.700005);
TextDrawColor(BoxNotice, 0);
TextDrawSetOutline(BoxNotice, 0);
TextDrawSetProportional(BoxNotice, 1);
TextDrawSetShadow(BoxNotice, 1);
TextDrawUseBox(BoxNotice, 1);
TextDrawBoxColor(BoxNotice, 100);
TextDrawTextSize(BoxNotice, 454.000000, 18.000000);
LoadingNotice = TextDrawCreate(313.000000, 193.000000, "Loading...");
TextDrawAlignment(LoadingNotice, 2);
TextDrawBackgroundColor(LoadingNotice, 255);
TextDrawFont(LoadingNotice, 2);
TextDrawLetterSize(LoadingNotice, 0.629999, 3.000000);
TextDrawColor(LoadingNotice, -1);
TextDrawSetOutline(LoadingNotice, 1);
TextDrawSetProportional(LoadingNotice, 1);
}
Re: Textdraw help. -
Vince - 27.10.2014
And? Where's the code to make it disappear?
Re: Textdraw help. -
mkmk - 27.10.2014
Quote:
Originally Posted by Vince
And? Where's the code to make it disappear?
|
How do I make that? Lmao - if you help I'll rep you mate.
Re: Textdraw help. -
Alex Magaсa - 27.10.2014
OnPlayerSpawn add this:
https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer
Re: Textdraw help. -
StR_MaRy - 27.10.2014
try
if(strcmp(cmdtext, "/textdrawhide", true) == 0)
{
if (PlayersStats[playerid] == 1)
{
PlayersStats[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTRED," Players textdraw is now disabled !");
TextDrawHideForPlayer(playerid,LoadingNotice);
TextDrawHideForPlayer(playerid,BoxNotice);
TextDrawHideForPlayer(playerid,StopAnim);
}
else
{
PlayersStats[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED," Players textdraw is now enabled !");
TextDrawShowForPlayer(playerid,LoadingNotice);
TextDrawShowForPlayer(playerid,BoxNotice);
TextDrawShowForPlayer(playerid,StopAnim);
}
return 1;
}
Re: Textdraw help. -
mkmk - 27.10.2014
Fixed.
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 2136.7041,33.7916,26.4215);
GivePlayerMoney(playerid, 1000);
TogglePlayerControllable(playerid, true);
TextDrawHideForPlayer(playerid, BoxNotice);
TextDrawHideForPlayer(playerid, LoadingNotice);
return 1;
}
Didn't have that lol