Bug with mele weapons
#1

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

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

https://sampwiki.blast.hk/wiki/GivePlayerWeapon
Reply
#4

please read what I wrote above
Reply
#5

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

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

thx man
Reply
#8

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

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]);
    }
}
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)