how to remove melee weapon
#1

question is how to remove melee weapon

i tried to set ammo to 0 i tried resetplayerweaponsex and then i read that it doesnt work for melee but im sure its possible
Reply
#2

PHP код:
stock RemovePlayerWeapon(playeridpweaponid)
{
        new 
plyWeapons[12];
        new 
plyAmmo[12];
 
        for(new 
slot 0slot 12slot++)
        {
                new 
pweppammo;
                
GetPlayerWeaponData(playeridslotpweppammo);
 
                if(
pwep != pweaponid)
                {
                        
GetPlayerWeaponData(playeridslotplyWeapons[slot], plyAmmo[slot]);
                }
        }
 
        
ResetPlayerWeapons(playerid);
        for(new 
slot 0slot 12slot++)
        {
                
GivePlayerWeapon(playeridplyWeapons[slot], plyAmmo[slot]);
        }
}
stock ResetPlayerWeaponsEx(playerid)
{
    new 
weaponammo;
    for(new 
i=0;i<12i++)
    {
         
GetPlayerWeaponData(playeridiweaponammo);
         if(
weapon<16RemovePlayerWeapon(playeridweapon);
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)