26/03/2022 00:13
Função para remover uma arma específica de um jogador.
Uso:
RemovePlayerWeaponID(playerid, 24) > Removerá a arma ID 24(Desert Eagle) do playerid.
by: nyft
Código PHP:
RemovePlayerWeaponID(playerid, weaponid)
{
new weapons[13][2];
for(new i; i < 13; i++)
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
ResetPlayerWeapons(playerid);
for(new i; i < 13; i++)
if(weapons[i][0] != 0 && weapons[i][0] != weaponid)
GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1]);
return 1;
}
Uso:
RemovePlayerWeaponID(playerid, 24) > Removerá a arma ID 24(Desert Eagle) do playerid.
by: nyft