textdraw not showing location
#1

hello people, i post because i get a problem with my text draw. I use a Zone Include to get Player actual Zone location:
pawn Код:
format(zone_string,256, "%s",GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME));
        TextDrawSetString(ZONE, zone_string);
in game, the text draw doesn't show the zone name(nothing appears). ( Yes, i have TextDrawShowForPlayer used. -.-) i tried replacing %s with %d, but it only shows "1" in game, anywhere i go. Anyway, it should be %s, since it's a string, right?

what is wrong? thanks
Reply
#2

GetPlayer2DZone puts the zone name into 'zone' and does not return it, it only return 1/0 if it was succesful or not.

Do it like this:

pawn Код:
GetPlayer2DZone(playerid, zone_string, MAX_ZONE_NAME);
TextDrawSetString(ZONE, zone_string);
Reply
#3

it worked, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)