19.01.2015, 14:42
Quote:
Well maybe because you are creating one textdraw again and again? Destroy it on disconnect or use playertextdraw.
|
EDT:
It seems that now the textdraws are getting overwritten.
(take a look at the commented line)
PHP код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT
new Text:TDEditor_TD[2];
forward HideDescriptionText(playerid);
forward OnPlayerHeadShot(playerid, issuerid, Float:amount);
public OnFilterScriptInit()
{
TDEditor_TD[0] = TextDrawCreate(402.199584, 4.378755, "Watch_movies_online_for_free_at_movies1337.com"); //This one here is changing to [HEADSHOT]blablabla
TextDrawLetterSize(TDEditor_TD[0], 0.400000, 0.800000);
TextDrawAlignment(TDEditor_TD[0], 2);
TextDrawColor(TDEditor_TD[0], 255);
TextDrawSetShadow(TDEditor_TD[0], 0);
TextDrawSetOutline(TDEditor_TD[0], 1);
TextDrawBackgroundColor(TDEditor_TD[0], 16711935);
TextDrawFont(TDEditor_TD[0], 2);
TextDrawSetProportional(TDEditor_TD[0], 1);
TextDrawSetShadow(TDEditor_TD[0], 0);
TDEditor_TD[1] = TextDrawCreate(166.000000, 432.044494, "play.bestsampserver.com:7777__/teles_/cmds_/rules");
TextDrawLetterSize(TDEditor_TD[1], 0.400000, 1.600000);
TextDrawAlignment(TDEditor_TD[1], 1);
TextDrawColor(TDEditor_TD[1], -1);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawSetOutline(TDEditor_TD[1], 1);
TextDrawBackgroundColor(TDEditor_TD[1], 255);
TextDrawFont(TDEditor_TD[1], 1);
TextDrawSetProportional(TDEditor_TD[1], 1);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawShowForAll(TDEditor_TD[0]);
TextDrawShowForAll(TDEditor_TD[1]);
return 1;
}
public OnFilterScriptExit()
{
TextDrawDestroy(TDEditor_TD[0]);
TextDrawDestroy(TDEditor_TD[1]);
return 1;
}
#else
main()
{
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForAll(TDEditor_TD[0]);
TextDrawShowForAll(TDEditor_TD[1]);
return 1;
}
No big deal if that's the case, I'll just reset everyone's textdraw variable.