20.05.2013, 18:02
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.
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;
}