Posts: 501
Threads: 175
Joined: Jan 2014
Reputation:
0
I can't destroy that brassknuckle xD I tried with SetPlayerAmmo but it's not working lol
I don't want to ResetPlayerWeapons because I want to remove only the brassknuckle lol
Posts: 103
Threads: 27
Joined: Jun 2015
Quote:
Originally Posted by Lirbo
I can't destroy that brassknuckle xD I tried with SetPlayerAmmo but it's not working lol
I don't want to ResetPlayerWeapons because I want to remove only the brassknuckle lol
|
Put this at the botom of the script:
PHP код:
stock RemovePlayerWeapon(playerid, weaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot != 12; slot++)
{
new wep, ammo;
GetPlayerWeaponData(playerid, slot, wep, ammo);
if(wep != weaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
}
ResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
}
And this in the command:
PHP код:
RemovePlayerWeapon(playerid, 1);