Text draw help! fast - 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: Text draw help! fast (
/showthread.php?tid=424783)
Text draw help! fast -
Anak - 23.03.2013
hello i have these codes ..
pawn Код:
new Text:Textdraw6;
// filterscript int..
Textdraw6 = TextDrawCreate(308.000000, 115.000000, "~y~XXXXXX");
TextDrawAlignment(Textdraw6, 2);
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 1);
TextDrawLetterSize(Textdraw6, 0.600000, 2.200000);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 0);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetShadow(Textdraw6, 1);
TextDrawUseBox(Textdraw6, 1);
TextDrawBoxColor(Textdraw6, 999999);
TextDrawTextSize(Textdraw6, 505.000000, 388.000000);
TextDrawSetSelectable(Textdraw6, 0);
//
//
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/acredits", cmdtext, true, 10))
{
TextDrawShowForPlayer(playerid, Textdraw6);
SendClientMessage(playerid, COLOR_YELLOW, "You are viewing credits - This Box will disappear automatically.");
SetTimerEx("CREDITS_TIMER", 10*1000, false, "i", playerid);
forward CREDITS_TIMER(playerid);
return 1;
}
return 0;
}
public CREDITS_TIMER(playerid)
{
TextDrawDestroy(Textdraw6);
}
now the problem..is
When a player joins and he enter command "/acredits" he see these textdraw but when he do again he can only see SendClientMessage but textdraw don't appear .. can any one help me to make it show every time.. ? not for one time.. thanks..
Re: Text draw help! fast -
mastermax7777 - 23.03.2013
pawn Код:
new Text:Textdraw6;
// filterscript int..
Textdraw6 = TextDrawCreate(308.000000, 115.000000, "~y~XXXXXX");
TextDrawAlignment(Textdraw6, 2);
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 1);
TextDrawLetterSize(Textdraw6, 0.600000, 2.200000);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 0);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetShadow(Textdraw6, 1);
TextDrawUseBox(Textdraw6, 1);
TextDrawBoxColor(Textdraw6, 999999);
TextDrawTextSize(Textdraw6, 505.000000, 388.000000);
TextDrawSetSelectable(Textdraw6, 0);
//
//
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/acredits", cmdtext, true, 10))
{
TextDrawShowForPlayer(playerid, Textdraw6);
SendClientMessage(playerid, COLOR_YELLOW, "You are viewing credits - This Box will disappear automatically.");
SetTimerEx("CREDITS_TIMER", 10*1000, false, "i", playerid);
return 1;
}
return 0;
}
forward CREDITS_TIMER(playerid);
public CREDITS_TIMER(playerid)
{
TextDrawHideForPlayer(playerid, Textdraw6);
}
Re: Text draw help! fast -
Anak - 23.03.2013
the only change is TextDrawHideForPlayer(playerid, Textdraw6);?
Re: Text draw help! fast -
Anak - 23.03.2013
thanks