textdraw not showing location - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: textdraw not showing location (
/showthread.php?tid=179361)
textdraw not showing location -
pmk1 - 26.09.2010
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
Re: textdraw not showing location -
Mauzen - 26.09.2010
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);
Re: textdraw not showing location -
pmk1 - 26.09.2010
it worked, thanks