Obrigado. Eu já consegui settar as skins já tá dando mas agora não tá dando pra remover as skins
Server-Script remove:
function setPlayerItemWeapon(player, weapon)
local isWeapon = getPedWeapon(player)
if weapon then
if weaponStates[player] then
exports.SysArmas:removeStickerFromObjectC(player)
takeAllWeapons(player)
weaponStates[player] = false
else
weaponStates[player] = true
takeAllWeapons(player)
if weapon ~= 22 then
toggleControl(player, "fire", true )
toggleControl(player, "aim_weapon", true )
giveWeapon (player, tonumber(weapon), (getElementData(player, weaponMuni[weapon]) or 0), true)
else
giveWeapon (player, tonumber(weapon), _, true)
end
end
end
end
server side:
function removeWeaponStickers(player)
triggerClientEvent(getRootElement(), "removeWeaponStickerC", getRootElement(), player)
end
client side:
function removeWeaponStickerC(localPlayer)
if localPlayer then
if vehiclesWithPaintjob[localPlayer] then
destroyElement(vehiclesWithPaintjob[localPlayer][1])
destroyElement(vehiclesWithPaintjob[localPlayer][2])
vehiclesWithPaintjob[localPlayer] = nil
end
end
end
addEvent("removeWeaponStickerC",true)
addEventHandler("removeWeaponStickerC", getRootElement(), removeWeaponStickerC)
ele não tá dando nenhum erro só não tá retirando a skin