Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- -- FABRICAR ARMAS
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- local fabricarArmas = {}
- fabricarArmas["ARMA: Taurus"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wbody|WEAPON_PISTOL"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"pistol_parts",15,false}) then
- if vRP.tryPayment({user_id,30000}) then
- vRPclient.notify(player, {"~g~Fabricando Arma."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wbody|WEAPON_PISTOL", 1, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>30.000</span><br>Total: <span class='food-item '>1x</span><br>» <span class='ilegal-item'>15</span> Componentes de PISTOLA"}
- fabricarArmas["ARMA: AK-47"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wbody|WEAPON_ASSAULTRIFLE"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"ak47_parts",30,false}) then
- if vRP.tryPayment({user_id,160000}) then
- vRPclient.notify(player, {"~g~Fabricando Arma."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wbody|WEAPON_ASSAULTRIFLE", 1, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>160.000</span><br>Total: <span class='food-item '>1x</span><br>» <span class='ilegal-item'>30</span> Componentes de AK-47"}
- fabricarArmas["ARMA: Shotgun"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wbody|WEAPON_PUMPSHOTGUN"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"shotgun_parts",20,false}) then
- if vRP.tryPayment({user_id,60000}) then
- vRPclient.notify(player, {"~g~Fabricando Arma."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wbody|WEAPON_PUMPSHOTGUN", 1, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>60.000</span><br>Total: <span class='food-item '>1x</span><br>» <span class='ilegal-item'>20</span> Componentes de SHOTGUN"}
- fabricarArmas["ARMA: SMG"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wbody|WEAPON_SMG"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"smg_parts",20,false}) then
- if vRP.tryPayment({user_id,90000}) then
- vRPclient.notify(player, {"~g~Fabricando Arma."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wbody|WEAPON_SMG", 1, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>90.000</span><br>Total: <span class='food-item '>1x</span><br>» <span class='ilegal-item'>20</span> Componentes de SMG"}
- fabricarArmas["PARTS: Colete"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"body_armor"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"colete_parts",5,false}) then
- if vRP.tryPayment({user_id,15000}) then
- vRPclient.notify(player, {"~g~Fabricando Colete."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "body_armor", 1, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>15.000</span><br>Total: <span class='food-item '>1x</span><br>» <span class='ilegal-item'>5</span> Componentes de COLETE"}
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- -- FABRICAR MUNIÇÃO
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- local fabricarMunicao = {}
- fabricarMunicao["MUNIÇÃO: Taurus"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wammo|WEAPON_PISTOL"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"pistol_parts",5,false}) then
- if vRP.tryPayment({user_id,5000}) then
- vRPclient.notify(player, {"~g~Fabricando Munição."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wammo|WEAPON_PISTOL", 200, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>5.000</span><br>Total: <span class='food-item '>200x</span><br>» <span class='ilegal-item'>5</span> Componentes de TAURUS"}
- fabricarMunicao["MUNIÇÃO: AK-47"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wammo|WEAPON_ASSAULTRIFLE"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"ak47_parts",5,false}) then
- if vRP.tryPayment({user_id,5000}) then
- vRPclient.notify(player, {"~g~Fabricando Munição."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wammo|WEAPON_ASSAULTRIFLE", 200, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>5.000</span><br>Total: <span class='food-item '>200x</span><br>» <span class='ilegal-item'>5</span> Componentes de AK-47"}
- fabricarMunicao["MUNIÇÃO: Shotgun"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wammo|WEAPON_PUMPSHOTGUN"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"shotgun_parts",5,false}) then
- if vRP.tryPayment({user_id,5000}) then
- vRPclient.notify(player, {"~g~Fabricando Munição."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wammo|WEAPON_PUMPSHOTGUN", 200, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>5.000</span><br>Total: <span class='food-item '>200x</span><br>» <span class='ilegal-item'>5</span> Componentes de SHOTGUN"}
- fabricarMunicao["MUNIÇÃO: SMG"] = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if vRP.getInventoryWeight({user_id})+vRP.getItemWeight({"wammo|WEAPON_SMG"}) <= vRP.getInventoryMaxWeight({user_id}) then
- if vRP.tryGetInventoryItem({user_id,"smg_parts",5,false}) then
- if vRP.tryPayment({user_id,5000}) then
- vRPclient.notify(player, {"~g~Fabricando Munição."})
- TriggerClientEvent('NZK:fabricarArmasHeading', player, 1)
- SetTimeout(5000, function() vRP.giveInventoryItem({user_id, "wammo|WEAPON_SMG", 200, true}) vRPclient.stopAnim(player,{false}) end)
- else vRPclient.notify(player, {"~r~Você não possui Dinheiro."})
- end
- else vRPclient.notify(player, {"~r~Você não possui os componentes necessarios."})
- end
- else vRPclient.notify(player, {"~r~Inventario Cheio."})
- end
- end
- end,"Valor: <span class='food-item '>5.000</span><br>Total: <span class='food-item '>200x</span><br>» <span class='ilegal-item'>5</span> Componentes de SMG"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement