Checking Weapons of any player
#1

Hello how i can add a commands in my GM for CHECK the weapons that have a player?
Reply
#2

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

Be sure to use https://sampwiki.blast.hk/ before asking please.
Reply
#3

Thanks but i search the complete script, i can't make the FS becouse i'm n00b LoL
Reply
#4

pawn Код:
new Weapons[12][2];//global variable

CMD:checkweapons(playerid, params[])
{
    new id,stringp[58];
    if(sscanf(params, "u",id))
        return SendClientMessage(playerid, -1, "Usage: /checkweapons [playerid]");
    new weaponname[32];
    for(new i=0; i<13; i++)
    {
        GetPlayerWeaponData(id, i, Weapons[i][0], Weapons[i][1]);
        if(Weapons[i][0] != 0 && Weapons[i][1] > 0)
        {
            GetWeaponName(Weapons[i][0], weaponname, 32);
            format(stringp, 58, "Weapon[%s] <---> Ammo[%d]", weaponname, Weapons[i][1]);
            SendClientMessage(playerid, -1, strinngp);
        }
    }
    return 1;
}
Reply
#5

The above code will only work if you have the sscanf2 and zcmd includes.
Reply
#6

Ok very thanks
Reply
#7

But this is a FS or I add this in the GM??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)