Something like ShowPlayerWeapons
#2

I assume you are using zcmd and sscanf, so try this:

pawn Код:
CMD:frisk(playerid, params[])
    {
    new ID;
    if (sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Usage: /frisk [id]");
    new weapons[13][2], string[100], weapname[32], count;
   
        for (new i=0;i<13;i++)
        {
            GetPlayerWeaponData(ID, i, weapons[i][0], weapons[i][1]);
            if (weapons[i][0] != 0)
            {
            GetWeaponName(weapons[i][0], weapname,sizeof(weapname));
            format(string,sizeof(string),"Weapon: %s || Ammo: %d || Weapon ID: %d", weapname,weapons[i][1], weapons[i][0]);
            SendClientMessage(playerid, -1, string);
            count++;
            }
        }
        if (count == 0) SendClientMessage(playerid, -1,"That user has no weapons");
    return 1;
    }
Reply


Messages In This Thread
Something like ShowPlayerWeapons - by Gooday - 06.01.2012, 18:04
Re: Something like ShowPlayerWeapons - by Jakku - 06.01.2012, 18:17
Re: Something like ShowPlayerWeapons - by Gooday - 06.01.2012, 19:04
Re: Something like ShowPlayerWeapons - by Jakku - 06.01.2012, 19:06
Re: Something like ShowPlayerWeapons - by Gooday - 06.01.2012, 19:09
Re: Something like ShowPlayerWeapons - by Jakku - 06.01.2012, 19:10
Re: Something like ShowPlayerWeapons - by Gooday - 06.01.2012, 19:15
Re: Something like ShowPlayerWeapons - by Jakku - 06.01.2012, 19:17
Re: Something like ShowPlayerWeapons - by Gooday - 06.01.2012, 19:23
Re: Something like ShowPlayerWeapons - by Gooday - 06.01.2012, 19:45

Forum Jump:


Users browsing this thread: 3 Guest(s)