SA-MP Forums Archive
[HELP] How to define weapon names - 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] How to define weapon names (/showthread.php?tid=182542)



[HELP] How to define weapon names - Pooh7 - 11.10.2010

Hi

I'm making weapon anticheat and i want to display what weapon is player have.
Part of code:
pawn Код:
oruzje = GetPlayerWeapon(i);
Part of code:
pawn Код:
format(string, sizeof(string), "Igrac: %s[%d] | Oruzje: %d | Municija: %d", citer, i, oruzje, municija);
This 2nd part of code will display something like this:
Код:
Igrac: Marko_Markovic[32] | Oruzje: 38 | Municija: 9999
So, player is Marko_Markovic, weapon is ID 38 (minigun) and ammu is 9999. But, how to display weapon name, not ID?
When I change my code to...:
pawn Код:
format(string, sizeof(string), "Igrac: %s[%d] | Oruzje: %s | Municija: %d", citer, i, oruzje, municija);
...weapon name not will be display.

Help


Re: [HELP] How to define weapon names - LarzI - 11.10.2010

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