PDA

View Full Version : GameTextForPlayer.


iGetty
22/05/2012, 02:57 AM
public PickupTimer(playerid)
{
for(new i = 0; i < MAX_HOUSES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, Houses[i][HouseExteriorX], Houses[i][HouseExteriorY], Houses[i][HouseExteriorZ]))
{
new string[256];
format(string, sizeof(string), "House %d~n~Price: $%d~n~Name: %s~n~Owner: %s~", i, Houses[i][HousePrice], Houses[i][HouseName], Houses[i][HouseOwner]);
GameTextForPlayer(playerid, string, 3000, 5);
return 1;
}
}
return 1;
}

Could anybody tell me what the problem with this is?

It spams my screen with all different ID's of houses and names, then crashes my game?

Thanks!

Niko_boy
22/05/2012, 03:21 AM
put new string out side of for loop at the top
also ig uess add GameTextForPlayer to bottom above return 1;