Jump to content

igoor.66_

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

igoor.66_'s Achievements

Square

Square (6/54)

0

Reputation

  1. Boa noite, tenho um servidor de mta grande e tô desistindo dele porque tá uma porcaria continuar, em 2 dias sofri um ataque de cheats e eles pegou painel P facilmente forçando o evento, e eu queria que vocês desse Ban nesse pessoal, é uma grupo de 3-5 pessoa.
  2. Bom dia, tenho um script de concessionaria e não quero que os jogador venda o carro quando os carro está spawnados, par a verificação do script eu devo usar setElementData ou algum evento. Bom eu dei uma olhada e coloquei esse codigo < if tabela.state == "Spawnado" then notifyS(player, "Você não pode vender veículos spawnados!", "error") return end > Código da concessionaria server.lua (parte de spawn) < addEvent("JOAO.manageVehicleGARAGEM", true) addEventHandler("JOAO.manageVehicleGARAGEM", root, function(player, type, tabela, indexMarker) if insertSpam(player) then notifyS(player, "Aguarde alguns segundos...", "info") return end local vehicle = getVehicleCar2(player, tonumber(tabela.idCar)) if type == "retirar" then if tabela.state == "Spawnado" then notifyS(player, "Seu veículo já está spawnado!", "error") else if tonumber(tabela.imposto) <= getRealTime().timestamp then notifyS(player, "Esse veículo está com imposto, portanto não é possível pegar ele!", "error") else if isElement(vehicle) then notifyS(player, "Você já tem um veículo spawnado!", "error") else local dadosVeh = fromJSON(tabela.dataCar) local color = (dadosVeh[1].color) local colorLight = (dadosVeh[1].light) local tuningA = fromJSON(tabela.tuning) vehicle = createVehicle(tabela.idCar, config["Markers"][indexMarker][5], config["Markers"][indexMarker][6], config["Markers"][indexMarker][7]) for i, v in pairs(tuningA) do if v then if i == "pneu" then addVehicleUpgrade(vehicle, v[1]) elseif i == "neonA" then setElementData(vehicle, "tuning.neon", v[1]) setElementData(vehicle, "vehicle.neon.active", true) end setElementData(vehicle, "tuning."..i, v) end end setVehicleHeadLightColor(vehicle, colorLight[1], colorLight[2], colorLight[3]) setVehicleColor(vehicle, color[1], color[2], color[3], color[4], color[5], color[6], color[7], color[8], color[9], color[10], color[11], color[12]) setElementData(vehicle, "JOAO.idVehicle", tabela.idColum) setVehiclePlateText(vehicle, tabela.placa) setElementHealth(vehicle, dadosVeh[1].vida) setElementData(vehicle, "JOAO.fuel", dadosVeh[1].gasolina) setElementData(vehicle, "Owner", player) notifyS(player, "Você spawnou o veículo com sucesso!", "success") contaDono[vehicle] = getAccountName(getPlayerAccount(player)) dados[vehicle] = {owner = player, account = getAccountName(getPlayerAccount(player)), id = tabela.idColum, rgDono = puxarID(player), seguroCar = tabela.seguro} dbExec(db, 'UPDATE Carros SET state = ? WHERE ID = ?', "Spawnado", tabela.idColum) end end end elseif type == "guardar" then if tabela.state == "Guardado" then notifyS(player, "Seu veículo já está guardado!", "error") else if isElement(vehicle) then local posVeh = {getElementPosition(vehicle)} local pos = {getElementPosition(player)} local distance = getDistanceBetweenPoints3D(posVeh[1], posVeh[2], posVeh[3], pos[1], pos[2], pos[3]) if distance <= 12 then saveDadosVeh(vehicle) if isElement(vehicle) then destroyElement(vehicle) end if isElement(blip[player]) then destroyElement(blip[player]) end notifyS(player, "Você guardou o veículo com sucesso!", "success") dbExec(db, 'UPDATE Carros SET state = ? WHERE ID = ?', "Guardado", dados[vehicle].id) else notifyS(player, "O veículo não está próximo a você!", "error") end else notifyS(player, "Erro ao guardar o veículo!", "error") end end end sendData(player, "garagem") end) > Parte de vender < function(player, tabela, id, valores, tipomoney, tipo) local infos = fromJSON(tabela.dataCar) local vehicle = getVehicleCar2(player, tonumber(tabela.idCar)) if insertSpam(player) then notifyS(player, "Aguarde alguns segundos...", "info") return end if infos[1].marca == "Exclusivo" then notifyS(player, "Esse veículo é exclusivo!", "error") else if tipo == "conce" then if tabela.state == "Recuperar" or tonumber(tabela.imposto) <= getRealTime().timestamp then notifyS(player, "Seu veículo precisa ser recuperado ou pagar imposto para poder vender!", "error") else if infos[1].typePago == "dinheiro" then givePlayerMoney(player, (infos[1].price-(10*infos[1].price/100))) notifyS(player, "Você vendeu seu carro para a concessionária e recebeu R$ "..formatNumber((infos[1].price-(10*infos[1].price/100)))..",00!", "info") dbExec(db, 'DELETE FROM Carros WHERE ID = ?', tabela.idColum) if isElement(vehicle) then destroyElement(vehicle) end sendData(player, "garagem") exports["astral_util"]:messageDiscord("O jogador(a) "..(exports["astral_util"]:puxarNome(player)).." ("..(exports["astral_util"]:puxarID(player))..") SE REPETIU A MSG 2 VEZES = DUP", "https://discord.com/api/webhooks/1189504786744221748/PysgtxxTlTVAVXT1VHNaqxqyCbhyOUX89XWfJFKLZeeSPFMnTtxOwTew2MVZRj7vReZc") else local atualVP = (getElementData(player, "moneycoins") or 0) setElementData(player, "moneycoins", atualVP+(infos[1].pricevp-(10*infos[1].pricevp/100))) notifyS(player, "Você vendeu seu carro para a concessionária e recebeu v$ "..formatNumber((infos[1].pricevp-(10*infos[1].pricevp/100))).."!", "info") dbExec(db, 'DELETE FROM Carros WHERE ID = ?', tabela.idColum) if isElement(vehicle) then destroyElement(vehicle) end sendData(player, "garagem") exports["astral_util"]:messageDiscord("O jogador(a) "..(exports["astral_util"]:puxarNome(player)).." ("..(exports["astral_util"]:puxarID(player))..") SE REPETIU A MSG 2 VEZES = DUP", "https://discord.com/api/webhooks/1189504786744221748/PysgtxxTlTVAVXT1VHNaqxqyCbhyOUX89XWfJFKLZeeSPFMnTtxOwTew2MVZRj7vReZc") end end else if verifyNumber(valores) then notifyS(player, "Você precisa digitar um valor em número!", "error") else if verifyNumber(id) then notifyS(player, "Você precisa digitar um ID em número!", "error") else local receiver = getPlayerFromID(tonumber(id)) if isElement(receiver) then if proposta[receiver] then notifyS(player, "Esse jogador já tem uma proposta pendente!", "error") else if infos[1].typePago ~= "dinheiro" then notifyS(player, "Você não pode vender carro que não seja comprado por money!", "error") return end if tabela.state == "Spawnado" then notifyS(player, "Você não pode vender veículos spawnados!", "error") return end if tabela.state == "Recuperar" or tonumber(tabela.imposto) <= getRealTime().timestamp then notifyS(player, "Seu veículo precisa ser recuperado ou pagar imposto para poder vender!", "error") else if tipomoney == "money" then if getPlayerMoney(receiver) >= valores then proposta[receiver] = {(getElementData(player, "ID") or 0)} dadosVenda[receiver] = {valores, infos[1].name, "money", tabela.idColum, tabela.idCar, tabela.state} notifyS(player, "Você enviou a proposta do veículo "..(infos[1].name).." com sucesso para o jogador "..puxarNome(receiver).."("..puxarID(receiver)..")", "success") notifyS(receiver, "Você recebeu a proposta do veículo "..(infos[1].name).." para aceitar digite /aceitarcar ou /negarcar", "info") else notifyS(player, "O jogador que você está oferecendo o carro não tem dinheiro suficiente!", "error") end else local pontos = getElementData(receiver, "moneycoins") or 0 if pontos >= valores then proposta[receiver] = {(getElementData(player, "ID") or 0)} dadosVenda[receiver] = {valores, infos[1].name, "pontos", tabela.idColum, tabela.idCar, tabela.state} setElementData(receiver, "propostaConce", (getElementData(player, "ID") or 0)) notifyS(player, "Você enviou a proposta do veículo "..(infos[1].name).." com sucesso para o jogador "..puxarNome(receiver).."("..puxarID(receiver)..")", "success") notifyS(receiver, "Você recebeu a proposta do veículo "..(infos[1].name).." para aceitar digite /aceitarcar ou /negarcar", "info") else notifyS(player, "O jogador que você está oferecendo o carro não tem Cash suficiente!", "error") end end end end else notifyS(player, "Esse jogador não está online!", "error") end end end end end end) >
  3. Esse script de animação está aparecendo só para quem usa (client) gostaria de deixar para server < local animTable = { ifp = {}, anims = { "BIKEd_Back", "BIKEd_drivebyFT", "BIKEd_drivebyLHS", "BIKEd_drivebyRHS", "BIKEd_Fwd", "BIKEd_getoffBACK", "BIKEd_getoffLHS", "BIKEd_getoffRHS", "BIKEd_hit", "BIKEd_jumponL", "BIKEd_jumponR", "BIKEd_kick", "BIKEd_Left", "BIKEd_passenger", "BIKEd_pushes", "BIKEd_Ride", "BIKEd_Right", "BIKEd_Snatch_L", "BIKEd_Snatch_R", "BIKEd_Still", } } addEventHandler("onClientResourceStart", resourceRoot, function() animTable.ifp["block"] = "biked" animTable.ifp["ifp"] = engineLoadIFP("biked.ifp", animTable.ifp["block"]) for _, v in ipairs(animTable.anims) do engineReplaceAnimation(localPlayer, "biked", v, animTable.ifp["block"], v) end end ) >
  4. Well, I wanted to put this animation when turning the bike in all IDs, but it only takes place in Shancez. How can I do it < local animTable = { ifp = {}, anims = { "BIKEd_Back", "BIKEd_drivebyFT", "BIKEd_drivebyLHS", "BIKEd_drivebyRHS", "BIKEd_Fwd", "BIKEd_getoffBACK", "BIKEd_getoffLHS", "BIKEd_getoffRHS", "BIKEd_hit", "BIKEd_jumponL", "BIKEd_jumponR", "BIKEd_kick", "BIKEd_Left", "BIKEd_passenger", "BIKEd_pushes", "BIKEd_Ride", "BIKEd_Right", "BIKEd_Snatch_L", "BIKEd_Snatch_R", "BIKEd_Still", } } addEventHandler("onClientResourceStart", resourceRoot, function() animTable.ifp["block"] = "biked" animTable.ifp["ifp"] = engineLoadIFP("biked.ifp", animTable.ifp["block"]) for _, v in ipairs(animTable.anims) do engineReplaceAnimation(localPlayer, "biked", v, animTable.ifp["block"], v) end end ) >
  5. Hello, so the code worked perfectly, but now I can't destroy the vehicle to get another one, even destroying it through the dashboard, the script recognizes that I still have it and won't let me get any more, just by relogging, do you know how to fix this?
  6. I would like to modify this code addCommandHandler("epilot", for bindkey local animEnable = {} local syncPlayers = {} addCommandHandler("epiloto", function(player) if (not animEnable[player]) then animEnable[player] = true triggerClientEvent(syncPlayers, "fuga4", player, true) outputChatBox("", player, 0, 255, 0, true) else animEnable[player] = false triggerClientEvent(syncPlayers, "fuga4", player, false) outputChatBox("", player, 255, 0, 0, true) end end ) addEvent("onClientSync", true ) addEventHandler("onClientSync", resourceRoot, function() table.insert(syncPlayers, client) for player, enable in ipairs(animEnable) do if (enable) then triggerClientEvent(client, "fuuga4", player, true) end end end ) addEventHandler("onPlayerQuit", root, function() for i, player in ipairs(syncPlayers) do if source == player then table.remove(syncPlayers, i) break end end if (animEnable[source] == true or animEnable[source] == false) then animEnable[source] = nil end end )
  7. I have a script where I get a car by command (/cm [ID] ) and this script does not have a spawn limit and I would like to set a limit function makeVehicleCmd(thePlayer, cmd, id) id = tonumber(id) if not id then return outputChatBox("SYNTAX: /"..cmd.." [Vehicle ID]", thePlayer, 255,194,14) end local x,y,z = getElementPosition(thePlayer) local rx,ry,rz = getElementRotation(thePlayer) local element = createTestElement(thePlayer, "vehicle", id, x,y,z, rx,ry,rz) if element then setElementPosition(thePlayer, x,y,z+3) setElementInterior(element, getElementInterior(thePlayer)) setElementDimension(element, getElementDimension(thePlayer)) end end addCommandHandler("cm", makeVehicleCmd, false, false)
×
×
  • Create New...