[HELP] How to define weapon names
#1

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
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)