16.03.2015, 17:20
I did this and it did not work.
pawn 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 < 12; w++)
{
new model = WepModel[PlayerWeapons[w][playerid]];
if(!strcmp(WeaponNames[model], string, true))
{
format(string, sizeof(string), "Weapon: %s | Ammo: %d | Weapon ID: %d", WeaponNames[model], WepAmmo[w], w);
SendClientMessage(playerid, COLOUR_WHITE, string);
}
}
return 1;
}