16.03.2015, 17:37
Quote:
Not quite sure why you're using 'PlayerWeapons' in the first place, this is all you really need:
pawn Code:
|
PHP Code:
CMD:weptest(playerid, params[])
{
new string[50];
if(sscanf(params, "s[50]", string)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /weptest [weapon]");
for(new w = 0; w < 47; w++)
{
if(!strcmp(WeaponNames[w], string, true))
{
format(string, sizeof(string), "Weapon: %s | Ammo: %d | Weapon ID: %d", WeaponNames[w], WepAmmo[w], w);
SendClientMessage(playerid, COLOUR_WHITE, string);
}
}
return 1;
}