TextDraw does not appear -
Ash. - 19.02.2011
Good Morning all,
I have only a small problem today. Im wondering if anyone can see a problem in the following;
pawn Код:
Site = TextDrawCreate(548.000000, 4.000000, "Trucking-World.net");
TextDrawAlignment(Site, 2);
TextDrawBackgroundColor(Site, 255);
TextDrawFont(Site, 2);
TextDrawLetterSize(Site, 0.360000, 1.700000);
TextDrawColor(Site, -1);
TextDrawSetOutline(Site, 1);
TextDrawSetProportional(Site, 1);
//I show it in OnPlayerConnect(playerid) and hide it in OnPlayerDisconnect(playerid, reason)
//I also show it in OnFilterScriptInit and hide it in OnFilterScriptInit, incase the admin script reboots.
Basically, the textdraw does not show, at all. Every other text draw does show, even the ones that are located in the same script as the one above, but it seems this one doesnt. Can anyone see a problem? - Its not really a big issue, but i would love it if someone could give me a hand.
Thanks in advance
Ash
Re : TextDraw does not appear -
Vukilore - 19.02.2011
TextDrawShowForPlayer(playerid, Site);
With CAPS
Re: TextDraw does not appear -
Ash. - 19.02.2011
Wow, maybe i should highlight it...
//I show it in OnPlayerConnect(playerid) and hide it in OnPlayerDisconnect(playerid, reason)
//I also show it in OnFilterScriptInit and hide it in OnFilterScriptInit, incase the admin script reboots.
However thanks, i know what you were thinking
Re: TextDraw does not appear -
Jochemd - 19.02.2011
Are you sure that position is valid?
Re: TextDraw does not appear -
Ash. - 19.02.2011
Very Sure, i used the text draw creater by Zamaroht (i think thats how you spell it) and it shows fine there. Its quite confusing at times.
However, if i restart my server (well, i did this on my test server, but it runs the same server version) it shows. However if i ONLY restart the ADMIN SCRIPT, it doesnt show, so im thinking a conflicting name or id in my GM script?
Re: TextDraw does not appear -
Jochemd - 19.02.2011
I don't think so. Are there any variables there in OnFilterScriptInit which the server can't pass?
Re: TextDraw does not appear -
Ash. - 19.02.2011
Not that i know to, and it compiles fine
My OnFilterScriptInit is as follows;
pawn Код:
public OnFilterScriptInit()
{
print("Administration Script Started");
if(fexist("/logs/admin.txt") == 0)
{
dini_Create("/logs/admin.txt");
}
SetTimer("UpdateSiteData", 60000, true);
SetTimer("JetPackCheck", 5000, true);
SetTimer("WeaponCheck", 5000, true);
SetTimer("PingCheck", 5000, true);
SetTimer("AntiTeleport", 5000, true);
SetTimer("MoneyCheck", 10000, true);
SetTimer("Messages", 500000, true);
Site = TextDrawCreate(548.000000, 4.000000, "Trucking-World.net");
TextDrawAlignment(Site, 2);
TextDrawBackgroundColor(Site, 255);
TextDrawFont(Site, 2);
TextDrawLetterSize(Site, 0.360000, 1.700000);
TextDrawColor(Site, -1);
TextDrawSetOutline(Site, 1);
TextDrawSetProportional(Site, 1);
RestartText = TextDrawCreate(245.000000, 358.000000, "_");
TextDrawAlignment(RestartText, 2);
TextDrawBackgroundColor(RestartText, 255);
TextDrawFont(RestartText, 1);
TextDrawLetterSize(RestartText, 0.539999, 1.200000);
TextDrawColor(RestartText, -1);
TextDrawSetOutline(RestartText, 1);
TextDrawSetProportional(RestartText, 1);
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Site);
}
pCheck(i);
AccountControl(i, 5);
}
UpdateSiteData();
return 1;
}
RestartText works correctly, and as it should. UpdateSiteData completes succesfully, so its not like something is beaking OnFilterScriptInit.
Re: TextDraw does not appear -
Jochemd - 19.02.2011
Then I don't know anymore. Sorry!
Re: TextDraw does not appear -
Ash. - 19.02.2011
Quote:
Originally Posted by Jochemd
Then I don't know anymore. Sorry!
|
T'is fine
I dont find it a big problem, because the actual website is in automatic messages and in subtle little places
Thanks Anyway
Re: TextDraw does not appear -
Ash. - 19.02.2011
Bump;
I've just had a thought, could the "-" hyphen, be causing a problem? I know there are some characters TextDraw's can't handle. Could this be one of them?
I haven't worked with TextDraw's much before, so im probably wrong. But it's just something that popped into my head.