SA-MP Forums Archive
Bug with mele weapons - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Bug with mele weapons (/showthread.php?tid=285285)



Bug with mele weapons - brawrr - 23.09.2011

I try setplayerammo, but it not work for mele weapon, like blunts, knife... how i can reset one mele weapon?


Re: Bug with mele weapons - brawrr - 23.09.2011

GivePlayerWeapon(playerid, weaponid, -1); also does not remove weapons


Re: Bug with mele weapons - Kingunit - 23.09.2011

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


Re: Bug with mele weapons - brawrr - 23.09.2011

please read what I wrote above


Re: Bug with mele weapons - Wesley221 - 23.09.2011

pawn Код:
GivePlayerWeapon(playerid, weaponid, 0);
Should work.. Also, this should be in the 'scripting discussion' IMO


Re: Bug with mele weapons - brawrr - 23.09.2011

its work for distance weapon, but not work for mele... I thought that this is a bug, so I wrote in this section


Re: Bug with mele weapons - brawrr - 24.09.2011

thx man


Re: Bug with mele weapons - brawrr - 24.09.2011

and why after the issue of weapons GivePlayerWeapon (playerid, 0, 1)?


Re: Bug with mele weapons - Raimis_R - 24.09.2011

pawn Код:
stock RemovePlayerWeapon(playerid, weaponid)
{
    new weaponsArray[13][2]; // 1 Model, 2 Ammo.
   
    for(new i = 0; != 13; ++i)
    {
        GetPlayerWeaponData(playerid, i, weaponsArray[i][0], weaponsArray[i][1]);
    }
   
    ResetPlayerWeapons(playerid);
   
    for(new i = 0; i != 13; ++i)
    {
        if (weaponsArray[i][0] != weaponid)
            GivePlayerWeapon(playerid, weaponsArray[i][0], weaponsArray[i][1]);
    }
}



Re: Bug with mele weapons - leong124 - 24.09.2011

Quote:
Originally Posted by brawrr
Посмотреть сообщение
and why after the issue of weapons GivePlayerWeapon (playerid, 0, 1)?
I think he wants to use SetPlayerArmedWeapon.
AFAIK GivePlayerWeapon(playerid,weaponid,0) works for melee weapons, and I'm using it in my script.