SA-MP Forums Archive
HELP! Putting functions in a TextDraw - 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: HELP! Putting functions in a TextDraw (/showthread.php?tid=75010)



HELP! Putting functions in a TextDraw - Dol - 28.04.2009

Hey I'm trying to make a visual inventory in SA-MP using the LA-RP script for now:

Код:
Inventory = TextDrawCreate(394.000000,164.000000,"~r~Weapon: ~w~%s, ~r~Ammo: ~w~%d", gunname, PlayerInfo[playerid][pInvAmmo]);
Then I get an error:

Код:
C:\Users\Derk\Desktop\Los Angeles Roleplay Server Files\gamemodes\larp.pwn(10621) : error 017: undefined symbol "gunname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
If this doesn't work how do I do it then?


Re: HELP! Putting functions in a TextDraw - Frikandel - 09.05.2009

Do this is
it is goodi think
srry for bad english.

Код:
new gunname;



Re: HELP! Putting functions in a TextDraw - Andom - 09.05.2009

Код:
new gunname[32];
GetWeaponName(GetPlayerWeapon(playerid), gunname, sizeof(gunname));



Re: HELP! Putting functions in a TextDraw - kc - 09.05.2009

use format.

https://sampwiki.blast.hk/wiki/Format