GameTextForPlayer.
#1

pawn Код:
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!
Reply
#2

put new string out side of for loop at the top
also ig uess add GameTextForPlayer to bottom above return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)