Textdraw not showing - 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: Textdraw not showing (
/showthread.php?tid=438523)
Textdraw not showing -
Stefand - 20.05.2013
Hey Folks,
I tried to make a textdraw to show the player what key to use when they try to enter a faction building.
When they are in the exterior pickup thing it does not show up.
I have the exact same system for house things and they show up.
I looked over this code 20 times now and I cant figure out why its bugged...
Hope one of you sees it.
pawn Код:
//ontop
forward PickupMessages();
//ongamemodeinit
PickupsTimer = SetTimer("PickupMessages", 1000, true);
public PickupMessages()
{
new string[255],string1[255],string3[255], string4[255], Float: playX, Float: playY, Float: playZ;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerInRangeOfPoint(i, 9, playX, playY, playZ))
{
if(IsPlayerConnectedEx(i))
{
for(new h = 0; h < MAX_FACTIONS; h++)
{
if(IsPlayerInRangeOfPoint(i, 3, Factions[h][HQExteriorX], Factions[h][HQExteriorY], Factions[h][HQExteriorZ]))
{
TextDrawShowForPlayer(i, Text:EnterBG);
TextDrawShowForPlayer(i, Text:EnterText);
Player[i][LastFaction] = h;
}
if(!IsPlayerInRangeOfPoint(i, 3, Factions[Player[i][LastFaction]][HQExteriorX], Factions[Player[i][LastFaction]][HQExteriorY], Factions[Player[i][LastFaction]][HQExteriorZ]))
{
TextDrawHideForPlayer(i, Text:EnterBG);
TextDrawHideForPlayer(i, Text:EnterText);
}
if(IsPlayerInRangeOfPoint(i, 3, Factions[h][SafeX], Factions[h][SafeY], Factions[h][SafeZ]))
{
if(GetPlayerVirtualWorld(i) == Factions[h][SafeWorld])
{
format(string, sizeof(string), "~w~%s ~w~ Safe", Factions[h][FactionName]);
GameTextForPlayer(i, string, 3500, 3);
}
}
}
}
}
}
return 1;
}
Re: Textdraw not showing -
Stefand - 20.05.2013
EDIT: The safe thing does show up.
Re: Textdraw not showing -
radiobizza - 20.05.2013
I think the problem is there...:
PHP код:
for(new h = 0; h < MAX_FACTIONS; h++) // with (MAX_FACTIONS) ?!?!?!
{
if(IsPlayerInRangeOfPoint(i, 3, Factions[h][HQExteriorX], Factions[h][HQExteriorY], Factions[h][HQExteriorZ]))
{
TextDrawShowForPlayer(i, Text:EnterBG);
TextDrawShowForPlayer(i, Text:EnterText);
Re: Textdraw not showing -
Stefand - 20.05.2013
Well its working now xD dunno how but its magic.
SOLVED