Jump to content

dener189

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by dener189

  1. Olá, pq a musica não para quando finaliza o download? Já tentei fazer que parasse com o "stopSound" mas não funcionou da forma que fiz client: if getElementData(root, "player:uid") then return end local screenW, screenH = guiGetScreenSize() local startTicking = getTickCount() local rotation = 0 local wFont = dxCreateFont("czcionka.ttf", 12) local wFont2 = dxCreateFont("czcionka.ttf", 10) function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end function loadingDownload() local hype = interpolateBetween(0, 0, 0, -15, 100, 0, ((getTickCount() - startTicking) / 2500), "SineCurve") local hype2 = interpolateBetween(0, 0, 0, -35, 300, 0, ((getTickCount() - startTicking) / 2500), "SineCurve") rotation = rotation - 2 > 360 and 0 or rotation - 2 dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW, screenH, "images/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Baixando...", screenW * 0.0400, screenH * 1.8500, screenW * 0.9846, screenH * 0.0898, tocolor(255, 255, 255, 225), 1, wFont, "left", "center", false, false, false, false, false) end addEventHandler("onClientRender", root, loadingDownload) function loadingObjects() local hype = interpolateBetween(0, 0, 0, -15, 100, 0, ((getTickCount() - startTicking) / 2500), "SineCurve") local hype2 = interpolateBetween(0, 0, 0, -35, 300, 0, ((getTickCount() - startTicking) / 2500), "SineCurve") rotation = rotation - 2 > 360 and 0 or rotation - 2 dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW, screenH, "images/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) --dxDrawImage(screenW * 0.4253, screenH * 0.3400 + hype, screenW * 0.1799, screenH * 0.3085, "images/logo.png", 0, 0, 0, tocolor(255, 255, 255, 220), false) dxDrawImage(x*694, y*519, x*181, y*46, "Img/bg.png", 0, 0, 0, corRetirar, true) dxDrawText("Baixando...", screenW * 0.0400, screenH * 1.8500, screenW * 0.9846, screenH * 0.0898, tocolor(255, 255, 255, 225), 1, wFont, "left", "center", false, false, false, false, false) dxDrawText("", screenW * 0.0550, screenH * 1.2010 + hype2, screenW * 0.9846, screenH * 0.0898, tocolor(255, 255, 255, 225), 1, wFont2, "center", "center", false, false, false, false, false) end function iniciarMusica() sound = playSound( "images/soung.mp3", true ) end addEventHandler( "onClientResourceStart", resourceRoot, iniciarMusica ) function checkingIsDownload() if getElementData(root, "player:uid") then return end if isTransferBoxActive() == true then addEventHandler("onClientRender", root, loadingDownload) addEventHandler("onClientResourceStart", root, resourceRoot) showCursor(true) showChat(false) else if isEventHandlerAdded("onClientRender", root, loadingDownload) then removeEventHandler("onClientRender", root, loadingDownload) removeEventHandler("onClientResourceStart", root, resourceRoot) showCursor(false) showChat(true) stopSound(piosenka) end end end setTimer(checkingIsDownload, 500, 0) function checkingIsComingObject() if getElementData(root, "load:objects") then addEventHandler("onClientRender", root, loadingObjects) addEventHandler("onClientResourceStart", root, resourceRoot) showCursor(true) showChat(false) else if isEventHandlerAdded("onClientRender", root, loadingObjects) then removeEventHandler("onClientRender", root, loadingObjects) removeEventHandler("onClientResourceStart", root, resourceRoot) showCursor(false) showChat(true) end end end setTimer(checkingIsComingObject, 500, 0) function filedelet () if fileExists("loading_c.Lua") then fileDelete("loading_c.Lua") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), filedelet)
  2. Já fiz isso, mas mesmo assim o motorista consegui atirar
  3. Olá galera, existe um script nativo do MTA que tem a função que permite que o player atire de dentro do carro. Queria saber como faz para que o motorista do veículo não posso atirar? Script: Realdriveby
  4. Certo, mas como irei arrumar isso? Posso incluir alguma linha ou mudar algo para arrumar? E em questão ao "scr-lib", esse script não está presente no download do script em si, e não achei ele em nem um lugar na net '-', teria como eu remover esse inclusão do script?
  5. Olá, estou com um script de concessionaria, ele tem um sistema de compra, painel de veiculo e venda de veiculo. No painel do veiculo tem uma função para teletransportar o veiculo até você e é descontado certa quantia de dinheiro. Mas quando aperto na função e da o seguinte erro: [2019-09-26 02:45:36] ERROR: Client ((GM)Denner) triggered serverside event WarpMyVehicle, but event is not added serverside [2019-09-26 02:45:38] ERROR: [scripts]\Concessionaria\server.Lua:419: exports: Call to non-running server resource (scr-Lib) [string "?"] Server: customCarNames = -- новые названия { } shopsVehSpawns = { [1] = { 2131, -1133, 25.6, 0,0,359 }, [2] = { 555, -1278, 18, 0,0,100 }, [3] = { 1941, 2097, 10.8, 0,0,350 }, [4] = { -1988, 272, 36, 0,0,259 }, [5] = { -1642, 1213, 7.17, 0,0, 227 }, } function getFreeID() local result = dbPoll(dbQuery(db, "SELECT ID FROM VehicleList ORDER BY ID ASC"), -1) newID = false for i, id in pairs (result) do if id["ID"] ~= i then newID = i break end end if newID then return newID else return #result + 1 end end function getVehicleByID(id) v = false for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "ID") == id then v = veh break end end return v end function updateVehicleInfo(player) if isElement(player) then local result = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(player))), -1) if type(result) == "table" then setElementData(player, "VehicleInfo", result) end end end addEventHandler("onResourceStart", resourceRoot, function() db = dbConnect("sqlite", "database.db") dbExec(db, "CREATE TABLE IF NOT EXISTS VehicleList (ID, Account, Model, X, Y, Z, RotZ, Colors, Upgrades, Paintjob, Cost, HP, new_hydr)") for i, player in ipairs(getElementsByType("player")) do updateVehicleInfo(player) end end) addEvent("onOpenGui", true) addEventHandler("onOpenGui", root, function() updateVehicleInfo(source) end) function destroyVehicle(theVehicle) if isElement(theVehicle) then local Owner = getElementData(theVehicle, "Owner") if Owner then local x, y, z = getElementPosition(theVehicle) local _, _, rz = getElementRotation(theVehicle) local r1, g1, b1, r2, g2, b2 = getVehicleColor(theVehicle, true) local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 upgrade = "" for _, upgradee in ipairs (getVehicleUpgrades(theVehicle)) do if upgrade == "" then upgrade = upgradee else upgrade = upgrade..","..upgradee end end local Paintjob = getVehiclePaintjob(theVehicle) or 3 local id = getElementData(theVehicle, "ID") dbExec(db, "UPDATE VehicleList SET X = ?, Y = ?, Z = ?, RotZ = ?, HP = ?, Colors = ?, Upgrades = ?, Paintjob = ?, new_hydr = ? WHERE Account = ? AND ID = ?", x, y, z, rz, getElementHealth(theVehicle), color, upgrade, Paintjob, getElementData ( theVehicle, "NewHydr") and 1 or 0, getAccountName(getPlayerAccount(Owner)), id) updateVehicleInfo(Owner) local attached = getAttachedElements(theVehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end end destroyElement(theVehicle) end end addEvent("onBuyNewVehicle", true) addEventHandler("onBuyNewVehicle", root, function(Model, cost, r1, g1, b1, r2, g2, b2) abc = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 10 then outputMessage("#c1c1c1Desculpe, mas você só pode comprar #00FF6610#FFFFFF veiculos.", source, 38, 122, 216, true) return end if abc then outputMessage("#c1c1c1Você já tem este veiculo.", source, 38, 122, 216, true) return end if getPlayerMoney(source) >= tonumber(cost) then takePlayerMoney ( source, cost ) local x, y, z = getElementPosition(source) local _, _, rz = getElementRotation(source) local shopID = getElementData ( source, "atVehShop") local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 if shopID and shopsVehSpawns[shopID] then vehicle = createVehicle(Model, shopsVehSpawns[shopID][1], shopsVehSpawns[shopID][2], shopsVehSpawns[shopID][3], shopsVehSpawns[shopID][4], shopsVehSpawns[shopID][5], shopsVehSpawns[shopID][6]) else vehicle = createVehicle(Model, x-5, y+5, z, 0, 0, rz) end setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) setElementData(vehicle, "Owner", source) local NewID = getFreeID() setElementData(vehicle, "ID", NewID) dbExec(db, "INSERT INTO VehicleList VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", NewID, getAccountName(getPlayerAccount(source)), Model, x-5, y+5, z, rz, color, "", 3, cost, 1000, 0) outputMessage("#c1c1c1Por: #00FF66$"..cost, source, 38, 122, 216, true) updateVehicleInfo(source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) warpPedIntoVehicle ( source, vehicle ) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 150, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) else outputMessage("#c1c1c1Você não tem grana para comprar este veiculo.", source, 38, 122, 216, true) end end) vv = {} addEvent("SpawnMyVehicle", true) addEventHandler("SpawnMyVehicle", root, function(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then if getVehicleByID(id) then outputMessage("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1já está spawnado.", source, 38, 122, 216, true) else local color = split(data[1]["Colors"], ',') r1 = color[1] or 255 g1 = color[2] or 255 b1 = color[3] or 255 r2 = color[4] or 255 g2 = color[5] or 255 b2 = color[6] or 255 vehicle = createVehicle(data[1]["Model"], data[1]["X"], data[1]["Y"], data[1]["Z"], 0, 0, data[1]["RotZ"]) setElementData(vehicle, "ID", id) local upd = split(tostring(data[1]["Upgrades"]), ',') for i, upgrade in ipairs(upd) do addVehicleUpgrade(vehicle, upgrade) end local Paintjob = data[1]["Paintjob"] or 3 setVehiclePaintjob(vehicle, Paintjob) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) if tonumber(data[1]["HP"]) <= 255.5 then data[1]["HP"] = 255 end if data[1]["new_hydr"] and data[1]["new_hydr"] == 1 then setElementData(vehicle, "NewHydr", true) else setElementData(vehicle, "NewHydr", false) end setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) setElementHealth(vehicle, data[1]["HP"]) setElementData(vehicle, "Owner", source) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 50, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) outputMessage("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi spawnado.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Há um problema com o veiculo, notifique o administrador.", source, 38, 122, 216, true) end end) addEvent("DestroyMyVehicle", true) addEventHandler("DestroyMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then destroyVehicle(vehicle) outputMessage ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi removido.", source, 38, 122, 216, true) else outputMessage("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) addEvent("LightsMyVehicle", true) addEventHandler("LightsMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local Vehicle = getPedOccupiedVehicle(source) if Vehicle == vehicle then if getVehicleOverrideLights(vehicle) ~= 2 then setVehicleOverrideLights(vehicle, 2) outputMessage("#c1c1c1Seu veiculo #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1teve as luzes acesas.", source, 38, 122, 216, true) elseif getVehicleOverrideLights(vehicle) ~= 1 then setVehicleOverrideLights(vehicle, 1) outputMessage("#c1c1c1Seu veiculo #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1teve as luzes apagadas.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Você não está no veiculo!", source, 38, 122, 216, true) end else outputMessage("#c1c1c1O seu veiculo não está spawnado.", source, 38, 122, 216, true) end end) addEvent("LockMyVehicle", true) addEventHandler("LockMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not isVehicleLocked(vehicle) then setVehicleLocked(vehicle, true) setVehicleDoorsUndamageable(vehicle, true) setVehicleDoorState(vehicle, 0, 0) setVehicleDoorState(vehicle, 1, 0) setVehicleDoorState(vehicle, 2, 0) setVehicleDoorState(vehicle, 3, 0) outputMessage("#c1c1c1O seu transporte #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi #00FF66fechado.", source, 38, 122, 216, true) elseif isVehicleLocked(vehicle) then setVehicleLocked(vehicle, false) setVehicleDoorsUndamageable(vehicle, false) outputMessage("#c1c1c1O seu transporte #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi #00FF66aberto.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) addEvent("BlipMyVehicle", true) addEventHandler("BlipMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not getElementData(vehicle, "ABlip") then setElementData(vehicle, "ABlip", true) createBlipAttachedTo(vehicle, 41, 2, 255, 0, 0, 255, 0, 65535, source) outputMessage("#c1c1c1O seu transporte #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi marcado no mapa, usar #00FF66F11#c1c1c1 para encontrá-lo.", source, 38, 122, 216, true) else local attached = getAttachedElements(vehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end setElementData(vehicle, "ABlip", false) outputMessage("#c1c1c1O seu veículo #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1teve o blip removido.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1O seu veiculo não está spawnado.", source, 38, 122, 216, true) end end) addEvent("SellMyVehicle", true) addEventHandler("SellMyVehicle", root, function(id) local vehicle = getVehicleByID(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then local Money = math.ceil((data[1]["Cost"]*.9)*math.floor(data[1]["HP"])/100/10) givePlayerMoney (source, Money) if isElement(vehicle) then destroyElement(vehicle) end dbExec(db, "DELETE FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) outputMessage("#c1c1c1Você vendeu o seu veiculo por #00FF66$"..Money, source, 38, 122, 216, true) end end) function getDataOnLogin(_, account) updateVehicleInfo(source) end addEventHandler("onPlayerLogin", root, getDataOnLogin) function SaveVehicleDataOnQuit() for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "Owner") == source then destroyVehicle(veh) end end end addEventHandler("onPlayerQuit", root,SaveVehicleDataOnQuit) addEvent("inviteToBuyCarSended", true) addEventHandler("inviteToBuyCarSended", root, function(player, price, veh_name, veh_id) if player and price and veh_name and veh_id then local pl = getPlayerFromName ( player ) if pl then triggerClientEvent ( pl, "recieveInviteToBuyCar", pl, getPlayerName (source), getAccountName(getPlayerAccount(source)), price, veh_name, veh_id ) else outputMessage ( "#c1c1c1O jogador não foi encontrado, a venda foi cancelada", source, 250, 10, 10, true) triggerClientEvent ( source, "cleanCarInvitations", source ) end end end) addEvent("invitationBuyCarNotAccepted", true) addEventHandler("invitationBuyCarNotAccepted", root, function(player, acc, price, veh_name, veh_id) local pl = getPlayerFromName ( player ) if pl then triggerClientEvent ( pl, "cleanCarInvitations", pl ) outputMessage ( "#c1c1c1O jogador recusou-se a comprar o seu carro", pl, 250, 10, 10,true) end end) addEvent("invitationBuyCarAccepted", true) addEventHandler("invitationBuyCarAccepted", root, function(player, acc, price, veh_name, veh_id) local pl = getPlayerFromName ( player ) local avail = false if pl and getAccountName ( getPlayerAccount (pl)) == acc then avail = true triggerClientEvent ( pl, "cleanCarInvitations", pl ) --outputMessage ( "Игрок отказался покупать ваше авто", pl, 250, 10, 10) else for i, v in ipairs( getElementsByType ( 'player' ) ) do if getAccountName(getPlayerAccount ( v )) == acc then avail = true pl = v break end end end price = tonumber(price) or 0 if avail then if isGuestAccount ( getPlayerAccount ( source ) ) then triggerClientEvent ( pl, "cleanCarInvitations", pl ) outputMessage ( "#c1c1c1Você não está logado em sua conta, a transação foi cancelada", source, 250, 10, 10,true ) outputMessage ( "#c1c1c1O jogador não entrou na conta, a transação foi cancelada", pl, 250, 10, 10,true ) return true end if getPlayerMoney ( source ) >= price then local vehicle = getVehicleByID(tonumber(veh_id)) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(pl)), veh_id), -1) if type(data) == "table" and #data ~= 0 and isElement ( vehicle ) then givePlayerMoney ( pl, price ) takePlayerMoney ( source, price ) dbExec(db, "UPDATE VehicleList SET Account = ? WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), getAccountName(getPlayerAccount(pl)), veh_id) updateVehicleInfo(source) updateVehicleInfo(pl) setElementData(vehicle, "Owner", source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) outputMessage("#c1c1c1Você vendeu o seu veiculo por #00FF66$"..price, pl, 38, 122, 216, true) outputMessage("#c1c1c1Você comprou um carro por #00FF66$"..price, source, 38, 122, 216, true) triggerClientEvent ( pl, "cleanCarInvitations", pl ) else outputMessage ( "#c1c1c1A máquina não pode ser encontrado, o negócio é cancelado", source, 250, 10, 10,true ) outputMessage ( "#c1c1c1A máquina não pode ser encontrado, o negócio é cancelado. Tente carro desova.", pl, 250, 10, 10,true ) triggerClientEvent ( pl, "cleanCarInvitations", pl ) end else outputMessage ( "#c1c1c1Você não tem dinheiro suficiente, a transação foi cancelada", source, 250, 10, 10,true ) end else outputMessage ( "#c1c1c1O jogador não foi encontrado, a operação foi cancelada", source, 250, 10, 10,true) end end) function outputMessage (text, player, r, g, b) return exports["scr-Lib"]:outputMessage(player, text, r, g, b); end Client: function centerWindow ( center_window ) local sx, sy = guiGetScreenSize ( ) local windowW, windowH = guiGetSize ( center_window, false ) local x, y = ( sx - windowW ) / 2, ( sy - windowH ) / 2 guiSetPosition ( center_window, x, y, false ) end local customCarNames = -- Ids dos veiculos pra add mais copie e cole um abaixo do outro e mude o nome { [494] = 'Lamborguine'; [541] = 'Bugatti Veyron'; [415] = 'Ferrari'; [550] = 'Porsche Panamera'; [589] = 'AudiR8'; [579] = 'Hilux'; [516] = 'HB20'; [545] = 'Fusca'; [522] = 'XJ6'; [586] = 'Tiger'; [521] = 'CG 9000'; } setTimer ( function () local theCol = getElementData(root, "BlockExportCol") function isInColExport () if isElement(theCol) and isElementWithinColShape(localPlayer,theCol) then return true else return false end end function ClientExplosionCFunction() if isInColExport () then cancelEvent () end end addEventHandler("onClientExplosion", root, ClientExplosionCFunction) end , 1000, 1 ) local screX, screY = guiGetScreenSize() Window_VS = guiCreateWindow(373, 219, 557, 303,"Painel de Veiculos Comprados",false) guiSetAlpha(Window_VS, 0.88) guiWindowSetSizable(Window_VS, false) guiSetVisible(Window_VS, false) centerWindow(Window_VS) Grid_VS = guiCreateGridList(10, 28, 361, 235, false, Window_VS) guiGridListSetSelectionMode(Grid_VS, 1) guiGridListAddColumn(Grid_VS, "Nome", 0.4) guiGridListAddColumn(Grid_VS, "Preço", 0.3) guiGridListAddColumn(Grid_VS, "HP Auto", 0.2) Button_VS_sn_s = guiCreateStaticImage(381, 28, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_sn_o = guiCreateStaticImage(381, 28, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_sn = guiCreateLabel(381, 28, 166, 25, "Spawnar", false, Window_VS) guiSetFont(Button_VS_sn, "default-bold-small") guiLabelSetColor(Button_VS_sn, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_sn, "center") guiLabelSetHorizontalAlign(Button_VS_sn, "center") Button_VS_dy_s = guiCreateStaticImage(381, 63, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_dy_o = guiCreateStaticImage(381, 63, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_dy = guiCreateLabel(381, 63, 166, 25, "Remover", false, Window_VS) guiSetFont(Button_VS_dy, "default-bold-small") guiLabelSetColor(Button_VS_dy, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_dy, "center") guiLabelSetHorizontalAlign(Button_VS_dy, "center") Button_VS_Warp_s = guiCreateStaticImage(381, 98, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_Warp_o = guiCreateStaticImage(381, 98, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_Warp = guiCreateLabel(381, 98, 166, 25, "Teleport", false, Window_VS) guiSetFont(Button_VS_Warp, "default-bold-small") guiLabelSetColor(Button_VS_Warp, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_Warp, "center") guiLabelSetHorizontalAlign(Button_VS_Warp, "center") Button_VS_Warp_info = guiCreateLabel(428, 500, 103, 26, "Teleport: 500$", false) guiSetFont(Button_VS_Warp_info, "default-bold-small") guiLabelSetColor(Button_VS_Warp_info, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_Warp_info, "center") guiLabelSetHorizontalAlign(Button_VS_Warp_info, "center") --Button_VS_Warp_info Button_VS_Fix_s = guiCreateStaticImage(381, 133, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_Fix_o = guiCreateStaticImage(381, 133, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_Fix = guiCreateLabel(381, 133, 166, 25, "Fixar", false, Window_VS) guiSetFont(Button_VS_Fix, "default-bold-small") guiLabelSetColor(Button_VS_Fix, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_Fix, "center") guiLabelSetHorizontalAlign(Button_VS_Fix, "center") Button_VS_Fix_info = guiCreateLabel(428, 500, 103, 26, "Conserto: 500$", false) guiSetFont(Button_VS_Fix_info, "default-bold-small") guiLabelSetColor(Button_VS_Fix_info, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_Fix_info, "center") guiLabelSetHorizontalAlign(Button_VS_Fix_info, "center") Button_VS_lk_s = guiCreateStaticImage(381, 168, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_lk_o = guiCreateStaticImage(381, 168, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_lk = guiCreateLabel(381, 168, 166, 25, "Aberto - Fechado", false, Window_VS) guiSetFont(Button_VS_lk, "default-bold-small") guiLabelSetColor(Button_VS_lk, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_lk, "center") guiLabelSetHorizontalAlign(Button_VS_lk, "center") Button_VS_sl_s = guiCreateStaticImage(381, 203, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_sl_o = guiCreateStaticImage(381, 203, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_sl = guiCreateLabel(381, 203, 166, 25, "Vender Veiculo", false, Window_VS) guiSetFont(Button_VS_sl, "default-bold-small") guiLabelSetColor(Button_VS_sl, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_sl, "center") guiLabelSetHorizontalAlign(Button_VS_sl, "center") Button_VS_give_s = guiCreateStaticImage(381, 238, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_give_o = guiCreateStaticImage(381, 238, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_give = guiCreateLabel(381, 238, 166, 25, "Vender Para o Jogador", false, Window_VS) guiSetFont(Button_VS_give, "default-bold-small") guiLabelSetColor(Button_VS_give, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_give, "center") guiLabelSetHorizontalAlign(Button_VS_give, "center") adLabel = guiCreateLabel(130, 269, 296, 24, "Loja De carros", false, Window_VS) -------------- Nome do seu servidor guiSetFont(adLabel, "default-bold-small") guiLabelSetHorizontalAlign(adLabel, "center", false) guiLabelSetVerticalAlign(adLabel, "center") guiSetVisible(Button_VS_sn_o,false)-- guiSetVisible(Button_VS_dy_o,false)-- guiSetVisible(Button_VS_Warp_o,false) guiSetVisible(Button_VS_Warp_info,false) guiSetVisible(Button_VS_Fix_o,false) guiSetVisible(Button_VS_Fix_info,false) guiSetVisible(Button_VS_lk_o,false) guiSetVisible(Button_VS_sl_o,false) guiSetVisible(Button_VS_give_o,false) --Button_VS_Warp_info --Button_VS_Fix_info Window_CHK = guiCreateWindow(screX/2-155,screY/2-60,310,120,"Vender Veiculo!",false) guiSetVisible(Window_CHK, false) guiSetProperty(Window_CHK, "AlwaysOnTop", "true") guiWindowSetSizable(Window_CHK, false) Label_CHK = guiCreateLabel(21,28,266,36,"",false,Window_CHK) guiLabelSetColor(Label_CHK, 38, 122, 216) guiLabelSetHorizontalAlign(Label_CHK,"center",true) Button_CHK_Y = guiCreateButton(17,73,129,36,"Deseja Vender?",false,Window_CHK) Button_CHK_N = guiCreateButton(161,73,129,36,"Cancelar",false,Window_CHK) function updateGridList() local data = getElementData(localPlayer, "VehicleInfo") if data then local rw, cl = guiGridListGetSelectedItem(Grid_VS) guiGridListClear(Grid_VS) for i, data in ipairs (data) do local carName = customCarNames[ data['Model'] ] or getVehicleNameFromModel(data["Model"]) local ID = data["ID"] local Cost = data["Cost"] local HP = math.floor(data["HP"]) local PreCost = math.ceil(Cost*.9*HP/100/10) local row = guiGridListAddRow(Grid_VS) guiGridListSetItemText(Grid_VS, row, 1, carName, false, true) guiGridListSetItemData(Grid_VS, row, 1, ID) guiGridListSetItemText(Grid_VS, row, 2, PreCost, false, true) guiGridListSetItemText(Grid_VS, row, 3, HP.." HP", false, true) end guiGridListSetSelectedItem(Grid_VS, rw, cl) end end bindKey("F7", "down", function() if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then if getElementData(localPlayer, "MissionWarProtection") and getElementData(localPlayer, "MissionProtection")then return end guiSetVisible(Window_VS, not guiGetVisible(Window_VS)) guiSetVisible (Window_CHK, false) showCursor(guiGetVisible(Window_VS)) end end) triggerServerEvent("onOpenGui", localPlayer) addEventHandler("onClientElementDataChange", root, function(dd) if getElementType(source) == "player" and source == localPlayer and dd == "VehicleInfo" then local data = getElementData(source, dd) if data then updateGridList() end end end) function WINDOW_CLICK_VEHICLE (button, state, absoluteX, absoluteY) local id = guiGridListGetSelectedItem(Grid_VS) local ID = guiGridListGetItemData(Grid_VS, id, 1) if source == Button_VS_close then guiSetVisible(Window_VS, false) showCursor(false) end if (source == Grid_VS) then if id == -1 and idd then guiGridListSetSelectedItem(Grid_VS, idd, 1) return false else idd = guiGridListGetSelectedItem(Grid_VS) end elseif id == -1 then elseif (source == Button_VS_sn) then if not isInColExport () then triggerServerEvent("SpawnMyVehicle", localPlayer, ID) end elseif (source == Button_VS_dy) then triggerServerEvent("DestroyMyVehicle", localPlayer, ID) elseif (source == Button_VS_lt) then triggerServerEvent("LightsMyVehicle", localPlayer, ID) elseif (source == Button_VS_bp) then triggerServerEvent("BlipMyVehicle", localPlayer, ID) elseif (source == Button_VS_lk) then triggerServerEvent("LockMyVehicle", localPlayer, ID) elseif (source == Button_VS_sl) then guiSetVisible(Window_CHK, true) local carName = guiGridListGetItemText(Grid_VS, guiGridListGetSelectedItem(Grid_VS), 1) local carprice = guiGridListGetItemText(Grid_VS, guiGridListGetSelectedItem(Grid_VS), 2) guiSetText(Label_CHK, 'Você deseja realmente vender seu "'..carName..'" por $'..carprice) elseif source == Button_VS_give then createPlayersList(id) elseif source == Button_CHK_Y then triggerServerEvent("SellMyVehicle", localPlayer, ID) guiSetVisible(Window_VS, false) guiSetVisible(Window_CHK, false) showCursor(false) elseif source == Button_CHK_N then guiSetVisible (Window_CHK, false) elseif source == Button_VS_Spc then if getElementInterior(localPlayer) == 0 then if getElementData(localPlayer,"Stats") < 2 then SpecVehicle(ID) end end elseif source == Button_VS_Fix then triggerServerEvent("FixMyVehicle", localPlayer, ID) elseif source == Button_VS_Warp then if not isInColExport () then triggerServerEvent("WarpMyVehicle", localPlayer, ID) end elseif source == Button_PLS_Y then local row = guiGridListGetSelectedItem ( playerList_PLS ) if row and row ~= -1 then -- if guiGridListGetItemText ( playerList_PLS, row, 1 ) == getPlayerName ( localPlayer ) then -- return true -- end if (tonumber(guiGetText (edit_PLS_price)) or 0) >= 0 then outputMessage ( "#c1c1c1Esperar uma resposta do jogador.", 10, 250, 10,true ) invitations_send = true triggerServerEvent ( 'inviteToBuyCarSended', localPlayer, guiGridListGetItemText ( playerList_PLS, row, 1 ), guiGetText (edit_PLS_price) or 0, guiGridListGetItemText(Grid_VS, id, 1), guiGridListGetItemData(Grid_VS, id, 1) ) destroyElement ( Window_PLS ) end end elseif source == Button_PLS_N then destroyElement ( Window_PLS) end end addEventHandler("onClientGUIClick", resourceRoot, WINDOW_CLICK_VEHICLE) function invitationsClickVehicle () if source == Button_ABC_Y then showCursor ( false ) destroyElement ( Window_ABC ) if getPlayerMoney () >= ( tonumber(inv_price) or 0 ) then triggerServerEvent ("invitationBuyCarAccepted",localPlayer, inv_player, inv_acc, inv_price, inv_veh_name, inv_veh_id) else triggerServerEvent ("invitationBuyCarNotAccepted",localPlayer, inv_player ) end if #listOfInvitations > 0 then createAcceptBuyCarWindow (listOfInvitations[1][1],listOfInvitations[1][2],listOfInvitations[1][3],listOfInvitations[1][4] ) table.remove (listOfInvitations,1) end elseif source == Button_ABC_N then showCursor ( false ) triggerServerEvent ("invitationBuyCarNotAccepted",localPlayer, inv_player ) destroyElement ( Window_ABC ) if #listOfInvitations > 0 then createAcceptBuyCarWindow (listOfInvitations[1][1],listOfInvitations[1][2],listOfInvitations[1][3],listOfInvitations[1][4] ) table.remove (listOfInvitations,1) end end end addEventHandler("onClientGUIClick", resourceRoot, invitationsClickVehicle) function createPlayersList (row_id) showCursor ( true ) Window_PLS = guiCreateWindow(screX/2-155,screY/2-220,310,420,"Venda de carros!",false) guiSetVisible(Window_PLS, true) guiSetProperty(Window_PLS, "AlwaysOnTop", "true") guiWindowSetSizable(Window_PLS, false) Label_PLS_info = guiCreateLabel(21,28,266,36,"Digite o preço dos carros:",false,Window_PLS) edit_PLS_price = guiCreateEdit ( 110,58,90,36, guiGridListGetItemText(Grid_VS, row_id, 2) or 0, false, Window_PLS ) guiLabelSetColor(Label_PLS_info, 38, 122, 216) guiLabelSetHorizontalAlign(Label_PLS_info,"center",true) Button_PLS_Y = guiCreateButton(17,379,129,36,"Vender",false,Window_PLS) Button_PLS_N = guiCreateButton(161,379,129,36,"Fechar",false,Window_PLS) addEventHandler("onClientGUIChanged", edit_PLS_price, function(element) guiSetText ( edit_PLS_price, string.gsub (guiGetText( edit_PLS_price ), "%a", "") ) end) playerList_PLS = guiCreateGridList ( 21, 100, 268, 265, false, Window_PLS ) local column = guiGridListAddColumn( playerList_PLS, "Jogadores", 0.85 ) if ( column ) then for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList_PLS ) guiGridListSetItemText ( playerList_PLS, row, column, getPlayerName ( player ), false, false ) end end end --createPlayersList () listOfInvitations = {} inv_player, inv_acc, inv_price, inv_veh_name, inv_veh_id = nil, nil, nil, nil, nil addEvent("recieveInviteToBuyCar", true) addEventHandler("recieveInviteToBuyCar", root, function(player, acc, price, veh_name, veh_id) if player and price and acc and veh_name and veh_id then if getPlayerFromName ( player ) then if not isElement ( Window_ABC ) then createAcceptBuyCarWindow (player,acc,price, veh_name, veh_id) else table.insert ( listOfInvitations, {player,acc,price, veh_name, veh_id}) end else outputMessage ( "#c1c1c1Jogador não pode ser encontrado", source, 250, 10, 10,true) end end end) addEvent("cleanCarInvitations", true) addEventHandler("cleanCarInvitations", root, function() invitations_send = false end) function createAcceptBuyCarWindow(player,acc,price, veh_name, veh_id) showCursor ( true ) inv_player, inv_acc, inv_price, inv_veh_name, inv_veh_id = player,acc,price, veh_name, veh_id Window_ABC = guiCreateWindow(screX/2-155,screY/2-220,410,100,"Venda de carros",false) guiSetVisible(Window_ABC, true) guiSetProperty(Window_ABC, "AlwaysOnTop", "true") guiWindowSetSizable(Window_ABC, false) Label_ABC_info = guiCreateLabel(10,28,390,36,player.." Te ofereceu o "..veh_name.." por "..price.."$ (o seu dinheiro: "..getPlayerMoney() .."$)",false,Window_ABC) guiLabelSetColor(Label_ABC_info, 38, 216, 38) guiLabelSetHorizontalAlign(Label_ABC_info,"center",true) Button_ABC_Y = guiCreateButton(17,70,129,36,"Comprar",false,Window_ABC) Button_ABC_N = guiCreateButton(264,70,129,36,"Cancelar",false,Window_ABC) end function SpecVehicle(id) if spc then removeEventHandler("onClientPreRender", root, Sp) setCameraTarget(localPlayer) if isTimer(freezTimer) then killTimer(freezTimer) end freezTimer = setTimer(function() setElementFrozen(localPlayer, false) end, 2500, 1) spc = false return end for i, vehicle in ipairs(getElementsByType("vehicle")) do if getElementData(vehicle, "Owner") == localPlayer and getElementData(vehicle, "ID") == id then cVeh = vehicle spc = true addEventHandler("onClientPreRender", root, Sp) guiSetVisible(Window_VS, false) showCursor(false) break end end end function Sp() if isElement(cVeh) then local x, y, z = getElementPosition(cVeh) setElementFrozen(localPlayer, true) setCameraMatrix(x, y-1, z+15, x, y, z) else removeEventHandler("onClientPreRender", root, Sp) setCameraTarget(localPlayer) if isTimer(freezTimer) then killTimer(freezTimer) end freezTimer = setTimer(function() setElementFrozen(localPlayer, false) end, 2500, 1) spc = false end end ShopMarkersTable = {} local ShopTable = { --------- Ids de cada um na sua loja do mesmo jeito que adicionou la encima bote aqui e mude os preços tambem [1] = {ID = {{541, 800000} ,{494, 950000} ,{415, 700000} ,{550, 550000} ,{589, 115000} ,{516, 24500} ,{579, 56000} ,{545, 5500} ,{521, 90000} ,{522, 75000} ,{586, 63500} }, vPosX = 2134, vPosY = -1170, vPosZ = 28.15, PosX = 2133, PosY = -1149, PosZ = 23.4, CamX = 2134.1, CamY = -1160, CamZ = 35, lookAtX = 2133.3, lookAtY = -1168, lookAtZ = 28}, [2] = {ID = {{541, 800000} ,{494, 950000} ,{415, 700000} ,{550, 550000} ,{589, 115000} ,{516, 24500} ,{579, 56000} ,{545, 5500} ,{521, 90000} ,{522, 75000} ,{586, 63500} }, vPosX = 552, vPosY = -1288, vPosZ = 18, PosX = 562, PosY = -1270, PosZ = 16, CamX = 552, CamY = -1275.82, CamZ = 21.61, lookAtX = 552, lookAtY = -1276.77, lookAtZ = 21.29}, [3] = {ID = {{541, 800000} ,{494, 950000} ,{415, 700000} ,{550, 550000} ,{589, 115000} ,{516, 24500} ,{579, 56000} ,{545, 5500} ,{521, 90000} ,{522, 75000} ,{586, 63500} }, vPosX = 1942.5, vPosY = 2052, vPosZ = 11, PosX = 1946, PosY = 2068, PosZ = 10, CamX = 1930.36, CamY = 2052.78, CamZ = 14.71, lookAtX = 1931.36, lookAtY = 2052.78, lookAtZ = 14.43}, [4] = {ID = {{541, 800000} ,{494, 950000} ,{415, 700000} ,{550, 550000} ,{589, 115000} ,{516, 24500} ,{579, 56000} ,{545, 5500} ,{521, 90000} ,{522, 75000} ,{586, 63500} }, vPosX = -1950, vPosY = 266, vPosZ = 36.2, PosX = -1954, PosY = 299, PosZ = 34, CamX = -1960.18, CamY = 266.06, CamZ = 37.94, lookAtX = -1959.2, lookAtY = 266.06, lookAtZ = 37.73}, [5] = {ID = {{541, 800000} ,{494, 950000} ,{415, 700000} ,{550, 550000} ,{589, 115000} ,{516, 24500} ,{579, 56000} ,{545, 5500} ,{521, 90000} ,{522, 75000} ,{586, 63500} }, vPosX = -1660, vPosY = 1213, vPosZ = 7, PosX = -1634, PosY = 1199, PosZ = 6, CamX = -1648.9, CamY = 1212.27, CamZ = 10.16, lookAtX = -1649.88, lookAtY = 1212.27, lookAtZ = 9.94} } VehicleShop_Window = guiCreateWindow(screX-350,screY-450, 343, 436, "Shop de Veiculos", false) guiSetVisible(VehicleShop_Window, false) guiWindowSetSizable(VehicleShop_Window , false) guiSetAlpha(VehicleShop_Window, 0.8) carGrid = guiCreateGridList(9, 20, 324, 329, false, VehicleShop_Window) guiGridListSetSelectionMode(carGrid, 0) carColumn = guiGridListAddColumn(carGrid, "Nome", 0.5) costColumn = guiGridListAddColumn(carGrid, "Preço", 0.4) carButton_s = guiCreateStaticImage(14, 355, 86, 56, "images/button_standard.png", false, VehicleShop_Window) carButton_o = guiCreateStaticImage(14, 355, 86, 56, "images/button_mouse.png", false, VehicleShop_Window) carButton = guiCreateLabel(14, 355, 86, 56, "Comprar", false, VehicleShop_Window) guiSetFont(carButton, "default-bold-small") guiLabelSetColor(carButton, 255, 255, 255) guiLabelSetVerticalAlign(carButton, "center") guiLabelSetHorizontalAlign(carButton, "center") carColorButton_s = guiCreateStaticImage(128, 355, 86, 56, "images/button_standard.png", false, VehicleShop_Window) carColorButton_o = guiCreateStaticImage(128, 355, 86, 56, "images/button_mouse.png", false, VehicleShop_Window) carColorButton = guiCreateLabel(128, 355, 86, 56, "Pintar", false, VehicleShop_Window) guiSetFont(carColorButton, "default-bold-small") guiLabelSetColor(carColorButton, 255, 255, 255) guiLabelSetVerticalAlign(carColorButton, "center") guiLabelSetHorizontalAlign(carColorButton, "center") closeButton_s = guiCreateStaticImage(237, 355, 86, 56, "images/button_standard.png", false, VehicleShop_Window) closeButton_o = guiCreateStaticImage(237, 355, 86, 56, "images/button_mouse.png", false, VehicleShop_Window) closeButton = guiCreateLabel(237, 355, 86, 56, "Sair", false, VehicleShop_Window) guiSetFont(closeButton, "default-bold-small") guiLabelSetColor(closeButton, 255, 255, 255) guiLabelSetVerticalAlign(closeButton, "center") guiLabelSetHorizontalAlign(closeButton, "center") guiSetVisible(carButton_o,false) guiSetVisible(closeButton_o,false) guiSetVisible(carColorButton_o,false) addEventHandler( "onClientMouseLeave", root, function() if source == Button_VS_sn then guiSetVisible(Button_VS_sn_s,true) guiSetVisible(Button_VS_sn_o,false) elseif source == Button_VS_dy then guiSetVisible(Button_VS_dy_s,true) guiSetVisible(Button_VS_dy_o,false) elseif source == Button_VS_Warp then guiSetVisible(Button_VS_Warp_s,true) guiSetVisible(Button_VS_Warp_o,false) guiSetVisible(Button_VS_Warp_info,false) elseif source == Button_VS_Fix then guiSetVisible(Button_VS_Fix_s,true)--Button_VS_Fix_info guiSetVisible(Button_VS_Fix_o,false) guiSetVisible(Button_VS_Fix_info,false) elseif source == Button_VS_lk then guiSetVisible(Button_VS_lk_s,true) guiSetVisible(Button_VS_lk_o,false) elseif source == Button_VS_sl then guiSetVisible(Button_VS_sl_s,true) guiSetVisible(Button_VS_sl_o,false) elseif source == Button_VS_give then guiSetVisible(Button_VS_give_s,true) guiSetVisible(Button_VS_give_o,false) elseif source == carButton then guiSetVisible(carButton_s,true) guiSetVisible(carButton_o,false) elseif source == closeButton then guiSetVisible(closeButton_s,true) guiSetVisible(closeButton_o,false) elseif source == carColorButton then guiSetVisible(carColorButton_s,true) guiSetVisible(carColorButton_o,false) end end) addEventHandler( "onClientMouseEnter", root, function() if source == Button_VS_sn then guiSetVisible(Button_VS_sn_s,false) guiSetVisible(Button_VS_sn_o,true) elseif source == Button_VS_dy then guiSetVisible(Button_VS_dy_s,false) guiSetVisible(Button_VS_dy_o,true) elseif source == Button_VS_Warp then guiSetVisible(Button_VS_Warp_s,false) guiSetVisible(Button_VS_Warp_o,true) guiSetVisible(Button_VS_Warp_info,true) elseif source == Button_VS_Fix then guiSetVisible(Button_VS_Fix_s,false)--Button_VS_Fix_info guiSetVisible(Button_VS_Fix_o,true) guiSetVisible(Button_VS_Fix_info,true) elseif source == Button_VS_lk then guiSetVisible(Button_VS_lk_s,false) guiSetVisible(Button_VS_lk_o,true) elseif source == Button_VS_sl then guiSetVisible(Button_VS_sl_s,false) guiSetVisible(Button_VS_sl_o,true) elseif source == Button_VS_give then guiSetVisible(Button_VS_give_s,false) guiSetVisible(Button_VS_give_o,true) elseif source == Button_VS_give then guiSetVisible(Button_VS_give_s,false) guiSetVisible(Button_VS_give_o,true) elseif source == carButton then guiSetVisible(carButton_s,false) guiSetVisible(carButton_o,true) elseif source == closeButton then guiSetVisible(closeButton_s,false) guiSetVisible(closeButton_o,true) elseif source == carColorButton then guiSetVisible(carColorButton_s,false) guiSetVisible(carColorButton_o,true) end end) for i, M in ipairs(ShopTable) do ShopMarker = createMarker(M["PosX"], M["PosY"], M["PosZ"], "cylinder", 2, 38, 122, 216) ShopMarkerShader = createMarker(M["PosX"], M["PosY"], M["PosZ"], "cylinder", 2, 38, 122, 216) ShopMarkersTable[ShopMarker] = true setElementData ( ShopMarker, "shopID", i ) setElementID(ShopMarker, tostring(i)) createBlipAttachedTo(ShopMarker, 55, 2, 255, 255, 255, 255, 0, 400) end function getVehicleModelFromNewName (name) for i,v in pairs ( customCarNames ) do if v == name then return i end end return false end addEventHandler("onClientGUIClick", resourceRoot, function() if (source == carGrid) then local carName = guiGridListGetItemText(carGrid, guiGridListGetSelectedItem(carGrid), 1) local carprice = guiGridListGetItemText(carGrid, guiGridListGetSelectedItem(carGrid), 2) if guiGridListGetSelectedItem(carGrid) ~= -1 then guiSetText(CarName, carName) guiSetText(CarPrice, "$"..carprice) local carID = getVehicleModelFromNewName(carName) or getVehicleModelFromName(carName) if isElement(veh) then setElementModel(veh, carID) return end veh = createVehicle(carID, ShopTable[i]["vPosX"], ShopTable[i]["vPosY"], ShopTable[i]["vPosZ"]) setVehicleDamageProof(veh, true) setElementFrozen(veh, true) setVehicleColor(veh, r1, g1, b1, r2, g2, b2) timer = setTimer(function() local x, y, z = getElementRotation(veh) setElementRotation(veh, x, y, z+3) end, 50, 0) else guiSetText(CarName, "Noun") guiSetText(CarPrice, "Noun") r1, g1, b1, r2, g2, b2 = math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255) if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end end elseif (source == carColorButton) then openColorPicker() elseif (source == carButton) then if guiGridListGetSelectedItem(carGrid) then local carName = guiGridListGetItemText(carGrid, guiGridListGetSelectedItem(carGrid), 1) local carID = getVehicleModelFromNewName(carName) or getVehicleModelFromName(carName) local carCost = guiGridListGetItemText (carGrid, guiGridListGetSelectedItem(carGrid), 2) local r1, g1, b1, r2, g2, b2 = getVehicleColor(veh, true) triggerServerEvent("onBuyNewVehicle", localPlayer, carID, carCost, r1, g1, b1, r2, g2, b2) outputMessage("#c1c1c1Você acabou de comprar um: #00FF66"..carName, 38, 122, 216, true) guiSetVisible(VehicleShop_Window, false) showCursor(false) setElementFrozen(localPlayer, false) fadeCamera(false, 1.0) setTimer(function() fadeCamera(true, 0.5) setCameraTarget(localPlayer) end, 1000, 1) if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end end elseif (source == closeButton) then if guiGetVisible(VehicleShop_Window) then guiSetVisible(VehicleShop_Window, false) showCursor(false) setElementFrozen(localPlayer, false) fadeCamera(false, 1.0) setElementData ( localPlayer, "atVehShop", false) setTimer(function() fadeCamera(true, 0.5) setCameraTarget(localPlayer) end, 1000, 1) if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end end end end) function openColorPicker() if (colorPicker.isSelectOpen) or not isElement(veh) then return end colorPicker.openSelect(colors) end function closedColorPicker() end function updateColor() if (not colorPicker.isSelectOpen) then return end local r, g, b = colorPicker.updateTempColors() if (veh and isElement(veh)) then r1, g1, b1, r2, g2, b2 = getVehicleColor(veh, true) if (guiCheckBoxGetSelected(checkColor1)) then r1, g1, b1 = r, g, b end if (guiCheckBoxGetSelected(checkColor2)) then r2, g2, b2 = r, g, b end setVehicleColor(veh, r1, g1, b1, r2, g2, b2) end end addEventHandler("onClientRender", root, updateColor) --[[addCommandHandler("xx", function() local x, y, z, lx, ly, lz = getCameraMatrix() setCameraMatrix(x, y, z, lx, ly, lz) outputChatBox(x..", "..y..", "..z..", "..lx..", "..ly..", "..z) end)]] addEventHandler("onClientMarkerHit", resourceRoot, function(player) if getElementType(player) ~= "player" or player ~= localPlayer or isPedInVehicle(player) then return end if ShopMarkersTable[source] then i = tonumber(getElementID(source)) guiGridListClear(carGrid) for i, v in ipairs(ShopTable[i]["ID"]) do local carName = customCarNames[ v[1] ] or getVehicleNameFromModel(v[1]) local row = guiGridListAddRow(carGrid) guiGridListSetItemText(carGrid, row, 1, carName, false, true) guiGridListSetItemText(carGrid, row, 2, tostring(v[2]), false, true) end setCameraMatrix(ShopTable[i]["CamX"], ShopTable[i]["CamY"], ShopTable[i]["CamZ"], ShopTable[i]["lookAtX"], ShopTable[i]["lookAtY"], ShopTable[i]["lookAtZ"]) guiSetVisible(VehicleShop_Window, true) showCursor(true) setElementData ( player, "atVehShop", getElementData ( source, "shopID")) guiGridListSetSelectedItem(carGrid, 0, 1) setTimer(function() setElementFrozen(localPlayer, true) local carName = guiGridListGetItemText(carGrid, 0, 1) local carID = getVehicleModelFromNewName(carName) or getVehicleModelFromName(carName) local x, y, z = ShopTable[i]["vPosX"], ShopTable[i]["vPosY"], ShopTable[i]["vPosZ"] if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end r1, g1, b1, r2, g2, b2 = math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255) veh = createVehicle(carID, x, y, z) setVehicleDamageProof(veh, true) setElementFrozen(veh, true) setVehicleColor(veh, r1, g1, b1, r2, g2, b2) timer = setTimer(function() local x, y, z = getElementRotation(veh) setElementRotation(veh, x, y, z+3) end, 50, 0) end, 100, 1) end end) addEventHandler("onClientRender", getRootElement(), function() local x2, y2, z2 = getElementPosition(localPlayer) for index, car in pairs(getElementsByType('vehicle')) do if(getElementData(car,'ownercar')) then local x, y, z = getElementPosition(car) z = z+1 local sx, sy = getScreenFromWorldPosition(x, y, z) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distance < 20) then local fontbig = 2-(distance/10) local owner = getElementData(car, "ownercar") if(owner) then dxDrawBorderedCarText("Proprietário: "..(owner), sx, sy, sx, sy, tocolor(255, 255, 255, 255), fontbig, "default-bold", "center") end end end end end for i, v in ipairs ( ShopTable ) do local sx, sy = getScreenFromWorldPosition(v.PosX, v.PosY, v.PosZ+1) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D ( x2, y2, z2,v.PosX, v.PosY, v.PosZ ) if distance < 30 then local fontbig = 3-(distance/10) --dxDrawBorderedCarText("", sx, sy, sx, sy, tocolor(212, 179, 17, 200), fontbig, "default-bold", "center") end end end end) function dxDrawBorderedCarText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end function outputMessage (text, r, g, b) return exports["scr-Lib"]:outputMessage(text, r, g, b); end Queria Saber se haveria uma forma de fazer spawn de todos os veículos possuídos e presentes no painel. Quando passa-se dentro de um cilindro abriria um painel e lá mostraria seus veículos para poder spawnar
  6. Olá, estava tendo o mesmo problema. Tem como remover o chat Say, mas ao remover ele você não conseguirá mais conseguir dar os comandos pré determinados por scripts do seu servidor, apenas irá conseguir dar esses comandos no F8. Recomendo que use um script que bloqueie a comunicação no chat Say, e apenas habilite ele para comandos. Se quiser eu tenho um script que faz isso, posso estar passando ele aqui para você se quiser. Espero ter ajudado
  7. Vou testar @Lord Henry e @MaligNos obrigado pela ajuda fornecida, os dois funcionaram. Vou optar em usar o do @MaligNos pois parece mais fácil de se manipular. Mais uma vez obrigado pela ajuda
  8. [2019-09-23 01:04:04] WARNING: [scripts]\TAG2\server.Lua:3: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2019-09-23 01:04:04] WARNING: [scripts]\TAG2\server.Lua:4: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2019-09-23 01:04:04] ERROR: [scripts]\TAG2\server.Lua:5: attempt to concatenate local 'accountName' (a boolean value)
  9. Assim? function darVIPOuro (playerSource, commandName, accountName) local account = getPlayerAccount(source) --pega a conta local accountName = getAccountName(account) if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" )) then aclGroupAddObject (aclGetGroup("Ouro"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo VIP Ouro com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarVIPOuro [Nick]", playerSource) end end addCommandHandler ("adiconarVIPPrata", darVIPPrata) pq se for assim ta dando erro [2019-09-23 00:22:52] WARNING: [scripts]\TAG2\server.Lua:100: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2019-09-23 00:22:52] WARNING: [scripts]\TAG2\server.Lua:101: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2019-09-23 00:22:52] ERROR: [scripts]\TAG2\server.Lua:102: attempt to concatenate local 'accountName' (a boolean value)
  10. [2019-09-22 23:50:17] ERROR: [scripts]\TAG2\server.Lua:5: attempt to concatenate local 'accountName' (a boolean value)
  11. Eu consigo andar, mas eu sou teletransportado pro local que nasci após ser preso. Como faço para parar de teletransportar pro local que nasço após ser preso?
  12. Olá comunidade MTA PT/BR . Fiz um script simples de dar TAG através de um comando, mas queria saber como posso fazer para que apenas um ou mais grupos da ACL possa dar esse comando. Server: function darSAMU (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("SAMU"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo SAMU com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarSAMU [Nick]", playerSource) end end addCommandHandler ("adiconarSAMU", darSAMU) function darVIP (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("VIP"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo VIP com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarVIP [Nick]", playerSource) end end addCommandHandler ("adiconarVIP", darVIP) function darVIPOuro (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("Ouro"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo VIP Ouro com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarVIPOuro [Nick]", playerSource) end end addCommandHandler ("adiconarVIPPrata", darVIPPrata) function darVIPPrata (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("Prata"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo VIP Prata com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarVIPPrata [Nick]", playerSource) end end addCommandHandler ("adiconarVIPPrata", darVIPPrata) function darVIPBronze (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("Bronze"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo VIP Bronze com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarVIPBronze [Nick]", playerSource) end end addCommandHandler ("adiconarVIPBronze", darVIPBronze) function darYoutuber (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("Youtuber"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo Youtuber com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarYoutuber [Nick]", playerSource) end end addCommandHandler ("adiconarYoutuber", darYoutuber) function darComandosPolicia (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("ComandosPolicia"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo Comando Policial com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarComandosPolicia [Nick]", playerSource) end end addCommandHandler ("adiconarComandosPolicia", darComandosPolicia) function darTraficante (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("Traficante"), "user."..accountName) outputChatBox ("O cidadão '"..accountName.."' foi adicionado no grupo Traficante com sucesso!", playerSource) else outputChatBox ("Nem um nome definico.", playerSource) outputChatBox ("Para dar TAG digite: /adiconarTraficante [Nick]", playerSource) end end addCommandHandler ("adiconarTraficante", darTraficante)
  13. Bom as rotas funciona, mas ta com outro bug, quando chego no local da entrega e aperto a tecla para concluir a entrega "Alt" simplesmente não completa a entrega, apenas aparece o malote entregue no local
  14. Consegui arrumar, apenas renomeei algumas linhas do script. Obrigado pela sua ajuda, e a ajuda dos demais
  15. Creio que não seja, pois removi a linha que dizia "toggleAllControls ( Jogador_Func, true )" mas mesmo assim n funfo:(
  16. Olá, como consigo fazer que o jogador que for preso possa andar pelo presidio, e como faço para eles ficarem visíveis entre si? No script original o player n consegui sair do local que ele desova '-' Já tentei colocar "setElementFrozen (false)" mas mesmo assim n vai Server: --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # # # # ################################################ --]] ------------------------------------------------- InteriorDP = 6 DimensaoDP = 0 Cmd01 = "a" -- Algema Cmd02 = "d" -- Desalgema Cmd03 = "r" -- Retira Armas Grupo = "ComandosPolicia" Distancia_Comandos = 7 Deixar_Preso = createMarker ( 1535.73486, -1672.03137, 13.38281 -1, "cylinder", 10, 255, 255, 255, 0 ) Local_Preso = createMarker ( 242.242, 50.246, 1019.539, "cylinder", 2.5, 255, 255, 255, 0 ) setElementFrozen( Jogador_Func, false ) setElementInterior ( Local_Preso, InteriorDP ) setElementDimension ( Local_Preso, DimensaoDP ) function emarker ( marker, md ) if md then if marker == Deixar_Preso then if getElementData ( source, "ocupacao" ) == "Policial" then setElementData ( source, "AirNewSCR_PrisaoArea", "Sim" ) exports.Scripts_OnMarkerMsgs_:create ( source, "Aviso: Aperte F9 para Abrir / Fechar o Painel de Prender do DP" ) end end end end addEventHandler ( "onPlayerMarkerHit", getRootElement ( ), emarker ) function lmarker ( marker, md ) if md then if marker == Deixar_Preso then setElementData ( source, "AirNewSCR_PrisaoArea", "Não" ) exports.Scripts_OnMarkerMsgs_:delete(source) end end end addEventHandler ( "onPlayerMarkerLeave", getRootElement ( ), lmarker ) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function Algemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then local player_a_ser_algemado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_algemado ) local nick_do_policial = getPlayerName ( thePlayer ) local jX, jY, jZ = getElementPosition (player_a_ser_algemado) local pX, pY, pZ = getElementPosition (thePlayer) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if thePlayer == player_a_ser_algemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode algemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_algemado, "algemado" ) or false if Verificar == true then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador ja Esta Algemado!", thePlayer, 255, 255, 255 ) else if dist <= Distancia_Comandos then setElementData(player_a_ser_algemado,"algemado", true ) setElementFrozen( player_a_ser_algemado, true ) toggleControl(player_a_ser_algemado, "fire", false) setPedAnimation( player_a_ser_algemado, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Algemado pelo Policial "..nick_do_policial, player_a_ser_algemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você algemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) else exports.Scripts_Textos:createNewDxMessage ( "Erro: Você esta Muito longe do Jogador! chegue mais Perto para poder Algema-lo!", thePlayer, 255, 255, 255 ) end end end end end end addCommandHandler( Cmd01, Algemar_Jogador) function Desalgemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo) ) then local player_a_ser_desalgemado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_desalgemado ) local nick_do_policial = getPlayerName ( thePlayer ) if thePlayer == player_a_ser_desalgemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode desalgemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_desalgemado, "algemado" ) or false if Verificar == false then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador não esta Algemado!", thePlayer, 255, 255, 255 ) else setElementData ( player_a_ser_desalgemado, "algemado", false ) setPedAnimation ( player_a_ser_desalgemado ) setElementFrozen ( player_a_ser_desalgemado, false ) toggleControl ( player_a_ser_desalgemado, "fire", true ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Desalgemado pelo Policial "..nick_do_policial, player_a_ser_desalgemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você desalgemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) end end end end end addCommandHandler( Cmd02, Desalgemar_Jogador) function Retirar_Armas ( source, cmd, pname ) if getElementData(source, "ocupacao" ) == "Policial" then local cliente = getPlayerFromPartialName(pname) if isElement(cliente) then if cliente == source then exports.Scripts_Dxmessages:outputDx(source, "Erro: Você não pode Retirar suas Proprias Armas!", "error") return end local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if dist <= 7 then takeAllWeapons ( cliente ) exports.Scripts_Dxmessages:outputDx(source, "Aviso: Você removeu todas as Armas do Jogador #ffffff"..getPlayerName(cliente).." #ffffffcom Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "Aviso: O Policial #ffffff"..getPlayerName(source).."#ffffff Confiscou todas as suas Armas!", "warning") end else exports.Scripts_Dxmessages:outputDx(source, "Erro: O Jogador Não Foi Encontrado!", "error") end end end addCommandHandler ( Cmd03, Retirar_Armas ) function Verificar_Emprego_Atual ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc and not isGuestAccount(acc) then local job = getElementData(player,'ocupacao') local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementData ( player, "ocupacao", "Policial" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Sim" ) setElementData ( player, "AirNew_Perm_Prender", "Sim" ) else setElementData ( player, "ocupacao", "Criminoso" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Não" ) setElementData ( player, "AirNew_Perm_Prender", "Não" ) end end end end setTimer ( Verificar_Emprego_Atual, 1500, 0 ) local Prisao_Blip = createBlip ( 1535.89856, -1672.66479, 13.38281 ) setElementVisibleTo ( Prisao_Blip, root, false ) function Nivel_de_Procurado ( source, int ) if int == 0 then setPlayerWantedLevel ( source, int ) else local wl = getPlayerWantedLevel ( source ) if wl + int <= 6 then setPlayerWantedLevel ( source, wl+int ) else setPlayerWantedLevel ( source, 6 ) end end end addEvent("AirNewSCR_Nivel_de_Procurado", true) addEventHandler("AirNewSCR_Nivel_de_Procurado", getRootElement ( ), Nivel_de_Procurado ) function Mensagens_Exports ( source, msg ) exports.Scripts_Textos:createNewDxMessage ( msg, source, 255, 255, 255 ) end addEvent ( "AirNewSCR_Mensagens_Exports", true) addEventHandler ( "AirNewSCR_Mensagens_Exports", getRootElement ( ), Mensagens_Exports ) function Enviar_Prisao_Servidor ( Jogador, Numero, Formato, Motivo ) outputChatBox ( "#1100FF[HR] #FFFFFFO Policial "..getPlayerName(source).." Prendeu o Cidadao "..Jogador.."!", root, 255, 255, 255, true ) outputChatBox ( "#1100FF[HR] #FFFFFFPelo tempo de "..Numero.." "..Formato..", Motivo: "..Motivo.."!", root, 255, 255, 255, true ) Jogador_Func = getPlayerFromName ( Jogador ) Estrelas_Preso = getPlayerWantedLevel ( Jogador_Func ) givePlayerMoney ( source, Estrelas_Preso*1000 ) if Formato == "Segundo(s)" then Multiplicador = 1 elseif Formato == "Minuto(s)" then Multiplicador = 60 elseif Formato == "Hora(s)" then Multiplicador = 3600 elseif Formato == "Dia(s)" then Multiplicador = 86400 end TempoPrisao = Numero*Multiplicador setElementData ( Jogador_Func, "AirNew_Tempo_Prisao", TempoPrisao ) setElementData ( Jogador_Func, "AirNew_Preso", "Sim" ) setPlayerWantedLevel ( Jogador_Func, 0 ) takeAllWeapons ( Jogador_Func ) setElementData ( Jogador_Func, "Policia:Captura", false ) setElementData ( Jogador_Func, "Player:Msg", "" ) showCursor ( Jogador_Func, false) setControlState ( Jogador_Func, "sprint", false) setControlState ( Jogador_Func, "walk", false) setControlState ( Jogador_Func, "forwards", false) toggleAllControls ( Jogador_Func, true ) triggerClientEvent ( source, "CancelTimeParaPrender:Time", source ) if getElementData ( Jogador_Func, "algemado" ) == false then setElementData ( Jogador_Func, "algemado", false ) setPedAnimation ( Jogador_Func ) toggleControl ( Jogador_Func, "fire", true ) end end addEvent( "AirNew_Enviar_Prisao", true ) addEventHandler( "AirNew_Enviar_Prisao", getRootElement(), Enviar_Prisao_Servidor ) function Capturar_Jogador ( source, wantedlevel, vitima ) local x, y, z = getElementPosition ( vitima ) if x < -518 and y < 0 then -- SF time = 4 end if x >= -518 and y < 510 then -- LS time = 2 end if x >= -518 and y >= 510 then -- LV time = 4 end setElementData ( source, "PoliceToPrision:Time", tonumber(time*60) ) setTimer ( triggerClientEvent, 10000, 1, source, "ShowTimeParaPrender:Time", source ) exports.Scripts_Textos:createNewDxMessage ( "Você foi Capturado pelo Policial "..getPlayerName(source), vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Você tem "..time.." Minutos para Levar o Jogador para a Prisão!", source, 255, 255, 255 ) toggleAllControls ( vitima, false ) setElementVisibleTo ( Prisao_Blip, source, true ) end addEvent("AirNewSCR_Capturar_Jogador", true) addEventHandler("AirNewSCR_Capturar_Jogador", getRootElement(), Capturar_Jogador ) function Teleportar_Capturado_Veiculo ( state, player , vehicle , seat ) if state == true then if seat and isElement ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end else removePedFromVehicle ( player ) end end addEvent ( "AirNewSCR_TeleportarVeiculo", true ) addEventHandler ( "AirNewSCR_TeleportarVeiculo", getRootElement ( ), Teleportar_Capturado_Veiculo ) function Remover_Jogador_Veiculo ( player ) removePedFromVehicle ( player ) end addEvent ( "AirNewSCR_Remover_Jogador_Veiculo", true ) addEventHandler ( "AirNewSCR_Remover_Jogador_Veiculo", getRootElement ( ), Remover_Jogador_Veiculo ) function Teleportar_Capturado_Player ( source, type, value, x, y ,z) local Policial = getElementData ( source, "Policia:Captura" ) if isElement ( Policial ) and not isPedInVehicle ( source ) then if type == "INT" then setElementInterior ( source, value ) elseif type == "DIM" then setElementDimension ( source, value ) end setElementPosition ( source, x, y ,z ) end end addEvent ( "AirNewSCR_TeleportarPlayer", true ) addEventHandler ( "AirNewSCR_TeleportarPlayer", getRootElement ( ), Teleportar_Capturado_Player ) function Liberar_Capturado ( source ) for p, player in ipairs ( getElementsByType ( "player" ) ) do job = getElementData ( player,"ocupacao" ) or "Nenhum" capturado = getElementData ( player, "Policia:Captura" ) if job == "Criminoso" and isElement ( capturado ) then if capturado == source then Soltar_Fail_Captura ( source, player ) end end end end addEvent ( "AirNewSCR_FalharCapturaLiberar", true ) addEventHandler ( "AirNewSCR_FalharCapturaLiberar", getRootElement ( ), Liberar_Capturado ) function Soltar_Fail_Captura ( policial, vitima ) exports.Scripts_Textos:createNewDxMessage ( "O policial falhou e voce está solto novamnte, fuja",vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Voce falhou e o criminoso está solto novamente",policial, 255, 255, 255 ) setElementVisibleTo ( Prisao_Blip, policial, false ) setElementData ( vitima, "Policia:Captura", false ) setElementData ( vitima, "Player:Msg", "" ) showCursor ( vitima, false ) setControlState ( vitima, "sprint", false ) setControlState ( vitima, "walk", false ) setControlState ( vitima, "forwards", false ) toggleAllControls ( vitima, true ) end --- // Salvamento - Carregamento // --- addEventHandler("onPlayerLogin", root, function( _, acc ) CarregarLoginPlay ( acc ) end ) function CarregarLoginPlay ( conta ) if not isGuestAccount ( conta ) then if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getAccountData ( conta, "AirNew_Tempo_Prisao" ) or 0 setElementData ( source, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getAccountData ( conta, "AirNew_Preso" ) or "Não" setElementData ( source, "AirNew_Preso", AirNew_Preso ) end end end function ReiniciarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then CarregarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStart", getRootElement ( ), ReiniciarScript ) -- function SalvarLoginPlay ( conta ) if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getElementData ( source, "AirNew_Tempo_Prisao" ) or 0 setAccountData ( conta, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getElementData ( source, "AirNew_Preso" ) or "Não" setAccountData ( conta, "AirNew_Preso", AirNew_Preso ) end end function DesligarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then SalvarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStop", getRootElement ( ), DesligarScript ) function JogadorQuit ( quitType ) local acc = getPlayerAccount ( source ) if not isGuestAccount ( acc ) then if acc then SalvarLoginPlay ( acc ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), JogadorQuit ) Client: --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # # # # ################################################ --]] ------------------------------------------------- local screenW, screenH = guiGetScreenSize() local resW, resH = 1366, 768 local x, y = (screenW/resW), (screenH/resH) InteriorDP = 6 DimensaoDP = 0 AirNew_Marker_Prisao = createMarker ( 242.242, 50.246, 1019.539 -1, "cylinder", 2.5, 0, 0, 0, 0 ) setElementInterior ( AirNew_Marker_Prisao, InteriorDP ) setElementDimension ( AirNew_Marker_Prisao, DimensaoDP ) function Jogador_na_Prisao ( player ) return isElementWithinMarker ( player, AirNew_Marker_Prisao ) end Policial_Atirar = {} Timer_Policial_Atirar = {} function Resetar_AgressaoPolicial ( cop ) if Policial_Atirar[cop] and Policial_Atirar[cop] == true then Policial_Atirar[cop] = false end end Abrir_Fechar_Prender = "F9" function Prender_Cacetete ( Atirador, weapon, bodypart ) local Vitima = source local Tempo_Prisao_Vitima = getElementData ( Vitima, "AirNew_Tempo_Prisao" ) or 0 local Emprego_Vitima = tostring ( getElementData ( Vitima, "ocupacao" ) ) or "Nenhum" if Atirador then Emprego_Atirador = getElementData ( Atirador, "ocupacao" ) or "Nenhum" else Emprego_Atirador = "Nenhum" end if Emprego_Vitima == true or Emprego_Vitima == false or Emprego_Vitima == nil or tostring ( Emprego_Vitima ) == "Nenhum" then cancelEvent ( ) end if Atirador ~= localPlayer or weapon == 53 or weapon == 54 or weapon == 50 or weapon == 55 then if Emprego_Vitima == "Criminoso" then local Capturado_Policial = getElementData ( Vitima, "Policia:Captura" ) if isElement ( Capturado_Policial ) then cancelEvent ( ) end if Jogador_na_Prisao ( Vitima ) == true and Tempo_Prisao_Vitima > 0 then cancelEvent ( ) end end if isElement ( Atirador ) then if Emprego_Atirador == "Criminoso" then if Emprego_Vitima == "Policial" then for k, v in pairs(Policial_Atirar) do if k == Vitima and v == true then return end end Policial_Atirar[Vitima] = true Timer_Policial_Atirar[Vitima] = setTimer ( Resetar_AgressaoPolicial, 30000, 1, Vitima ) triggerServerEvent ( "AirNewSCR_Nivel_de_Procurado", Atirador, Atirador, 1 ) Mensagens_Exports ( Atirador, "Aviso: Você Agrediu um Policial, e Pode ser Preso por isso!" ) else --cancelEvent ( ) end elseif Emprego_Atirador == "Policial" then if Emprego_Vitima == "Criminoso" then local wl = getPlayerWantedLevel ( Vitima ) or 0 if wl == 0 then Mensagens_Exports ( Atirador, "Erro: Este Jogador não tem Mandato de Prisão!" ) end if wl > 0 then if weapon == 3 or weapon == 23 then -- Cacetete / Tazer (Silenced) local Policia_Captura = getElementData ( source, "Policia:Captura" ) if isElement ( Policia_Captura ) then cancelEvent ( ) return end if Policia_Captura == false or Policia_Captura == nil then --local Captura_na_Prisao = Jogador_na_Prisao ( Vitima ) --if Captura_na_Prisao then -- triggerServerEvent( "AirNewSCR_Prender_Jogador", Atirador, Atirador, wl, source ) --else setElementData ( source, "Policia:Captura", Atirador ) setElementData ( source, "Player:Msg", "Capturado por\n"..getPlayerName ( Atirador ) ) triggerServerEvent ( "AirNewSCR_Capturar_Jogador", Atirador, Atirador, wl, source ) --end end end end end end end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer ( ), Prender_Cacetete ) function Mensagens_Exports ( source, msg ) triggerServerEvent ( "AirNewSCR_Mensagens_Exports", getRootElement(), source, msg ) end addEventHandler("onClientPreRender", root, function ( ) local Policial = getElementData ( localPlayer, "Policia:Captura" ) if isElement ( Policial ) then if isPedInVehicle ( Policial ) then statecop = true else statecop = false end if isPedInVehicle ( localPlayer ) then statecriminal = true else statecriminal = false end if statecop ~= statecriminal then if statecop == true then local vh = getPedOccupiedVehicle ( Policial ) if isElement ( vh ) then local passengers = getVehicleMaxPassengers ( vh ) for seat = 0, passengers do if seat > 0 and not getVehicleOccupant ( vh, seat ) then triggerServerEvent ( "AirNewSCR_TeleportarVeiculo", localPlayer, true, localPlayer, vh, seat ) break end end end else triggerServerEvent("AirNewSCR_TeleportarVeiculo", localPlayer,false, localPlayer , vhw , 0) end end local copX, copY, copZ = getElementPosition ( Policial ) local PrisonerX, PrisonerY, PrisonerZ = getElementPosition ( localPlayer ) local copInt = getElementInterior ( Policial ) local prisonerInt = getElementInterior ( localPlayer ) if copInt ~= prisonerInt and not isTimer ( intTimer ) then intTimer = setTimer ( function ( ) end, 3000, 1 ) triggerServerEvent ( "AirNewSCR_TeleportarPlayer", localPlayer, localPlayer, "INT", copInt, copX, copY, copZ ) end local copDim = getElementDimension ( Policial ) local prisonerDim = getElementDimension ( localPlayer ) if copDim ~= prisonerDim and not isTimer ( dimTimer ) then dimTimer = setTimer(function() end, 3000, 1) triggerServerEvent ( "AirNewSCR_TeleportarPlayer", localPlayer, localPlayer, "DIM", copDim, copX+0.1, copY+0.1, copZ+0.5) end local Distancia_Policial_Capturado = getDistanceBetweenPoints3D ( copX, copY, copZ, PrisonerX, PrisonerY, PrisonerZ ) if Distancia_Policial_Capturado > 20 then if not isTimer ( Muito_Longe_do_Policial ) then triggerServerEvent ( "AirNewSCR_TeleportarPlayer", localPlayer, localPlayer, false, false, copX+1, copY+1, copZ ) setPedControlState ( "forwards", false ) setPedControlState ( "walk", false ) setPedControlState ( "sprint", false ) Muito_Longe_do_Policial = setTimer ( function ( ) end, 3000, 1 ) end elseif Distancia_Policial_Capturado > 10 then setPedControlState ( "forwards", true ) setPedControlState ( "sprint", true ) setPedControlState ( "walk", false ) elseif Distancia_Policial_Capturado > 3 then setPedControlState ( "forwards", true ) setPedControlState ( "sprint", false ) setPedControlState ( "walk", false ) elseif Distancia_Policial_Capturado > 2 then setPedControlState ( "forwards", true ) setPedControlState ( "sprint", false ) setPedControlState ( "walk", true ) elseif Distancia_Policial_Capturado > 1 then setPedControlState ( "forwards", false ) setPedControlState ( "walk", false ) setPedControlState ( "sprint", false ) end setPedRotation ( localPlayer, 360-math.deg(math.atan2((copX-PrisonerX), (copY-PrisonerY))) % 360 ) setCameraTarget ( localPlayer ) end end) function AbrirFechar_Prisao ( ) if getElementData ( localPlayer, "AirNew_Perm_Prender" ) == "Sim" then if guiGetVisible ( AirNew_Painel_Prender ) == false then if getElementData ( localPlayer, "AirNewSCR_PrisaoArea" ) == "Sim" then showCursor ( true ) guiSetVisible ( AirNew_Painel_Prender, true ) AtualizarListaDeNicks () SetarNaLista () playSoundFrontEnd ( 43 ) end else showCursor ( false ) guiSetVisible ( AirNew_Painel_Prender, false ) playSoundFrontEnd ( 40 ) end end end bindKey ( Abrir_Fechar_Prender, "down", AbrirFechar_Prisao ) addEventHandler("onClientResourceStart", getResourceRootElement(), function() guiSetInputMode("no_binds_when_editing") end) AirNew_Painel_Prender = guiCreateWindow((screenW - 535) / 2, (screenH - 362) / 2, 535, 362, "Painel de Prender - ("..Abrir_Fechar_Prender..")", false) guiWindowSetSizable(AirNew_Painel_Prender, false) guiSetAlpha(AirNew_Painel_Prender, 0.70) guiSetVisible ( AirNew_Painel_Prender, false ) AirNew_Gridlist_Prender = guiCreateGridList(19, 37, 184, 299, false, AirNew_Painel_Prender) AirNew_Gridlist_Prender_Coluna = guiGridListAddColumn(AirNew_Gridlist_Prender, "Jogadores", 0.9) AirNew_Gridlist_Tempo = guiCreateGridList(226, 97, 289, 113, false, AirNew_Painel_Prender) AirNew_Gridlist_Tempo_Coluna = guiGridListAddColumn(AirNew_Gridlist_Tempo, "Tempo", 0.9) AirNew_Label_Motivo = guiCreateLabel(228, 218, 287, 15, "Motivo da Prisão", false, AirNew_Painel_Prender) guiLabelSetHorizontalAlign(AirNew_Label_Motivo, "center", false) guiLabelSetVerticalAlign(AirNew_Label_Motivo, "center") AirNew_Edit_Motivo = guiCreateEdit(226, 237, 289, 34, "", false, AirNew_Painel_Prender) AirNew_Edit_SMHD = guiCreateEdit(226, 56, 289, 34, tonumber("0"), false, AirNew_Painel_Prender) AirNew_Label_SMHD = guiCreateLabel(228, 37, 287, 15, "Informe um Numero e Selecione um Tempo!", false, AirNew_Painel_Prender) guiLabelSetHorizontalAlign(AirNew_Label_SMHD, "center", false) guiLabelSetVerticalAlign(AirNew_Label_SMHD, "center") AirNew_Botao_Prender = guiCreateButton(236, 288, 127, 48, "Prender", false, AirNew_Painel_Prender) guiSetProperty(AirNew_Botao_Prender, "NormalTextColour", "FF17FE00") AirNew_Botao_Fechar = guiCreateButton(378, 288, 127, 48, "Fechar", false, AirNew_Painel_Prender) guiSetProperty(AirNew_Botao_Fechar, "NormalTextColour", "FFFD0000") function AtualizarListaDeNicks () guiGridListClear ( AirNew_Gridlist_Prender ) for index, player in ipairs ( getElementsByType ( "player" ) ) do Lista_AirNew = guiGridListAddRow ( AirNew_Gridlist_Prender ) local x, y, z = getElementPosition ( localPlayer) -- Eu local x1, y1, z1 = getElementPosition ( player ) -- Jogadores Proximos local Distancia = getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 ) if Distancia <= 5 then guiGridListSetItemText ( AirNew_Gridlist_Prender, Lista_AirNew, AirNew_Gridlist_Prender_Coluna, (string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( AirNew_Gridlist_Prender, Lista_AirNew, AirNew_Gridlist_Prender_Coluna, getPlayerName(player) ) end end end addEventHandler ( "onClientPlayerJoin", getRootElement(), AtualizarListaDeNicks ) addEventHandler ( "onClientPlayerQuit", getRootElement(), AtualizarListaDeNicks ) addEventHandler ( "onClientResourceStart", getRootElement(), AtualizarListaDeNicks ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), AtualizarListaDeNicks ) function SetarNaLista () guiGridListClear ( AirNew_Gridlist_Tempo ) local components = { "Segundo(s)", "Minuto(s)", "Hora(s)", "Dia(s)" } for _, component in ipairs( components ) do ListaAnimF = guiGridListAddRow ( AirNew_Gridlist_Tempo ) guiGridListSetItemText ( AirNew_Gridlist_Tempo, ListaAnimF, AirNew_Gridlist_Tempo_Coluna, component, false, false) guiGridListSetItemData ( AirNew_Gridlist_Tempo, ListaAnimF, AirNew_Gridlist_Tempo_Coluna, component) end end addEventHandler ( "onClientResourceStart", getRootElement(), SetarNaLista ) function AirNew_Clicar_Botoes () if guiGetVisible ( AirNew_Painel_Prender ) == true then if getElementData ( localPlayer, "AirNew_Perm_Prender" ) == "Sim" then if source == AirNew_Botao_Prender then local Jogador_Selecionado = guiGridListGetItemData( AirNew_Gridlist_Prender, guiGridListGetSelectedItem ( AirNew_Gridlist_Prender ), 1 ) or nil local SMHD_Selecionado = tonumber( guiGetText ( AirNew_Edit_SMHD ) ) or nil local Tempo_Selecionado = guiGridListGetItemData( AirNew_Gridlist_Tempo, guiGridListGetSelectedItem ( AirNew_Gridlist_Tempo ), 1 ) or nil local Motivo_Prisao = guiGetText ( AirNew_Edit_Motivo ) or nil if Jogador_Selecionado == nil then return outputChatBox ( "Erro: Selecione um Jogador para Prender!", 255, 255, 255, true ) end if SMHD_Selecionado == tonumber("0") or SMHD_Selecionado == nil then return outputChatBox ( "Erro: Informe um Numero e Selecione um Tempo antes de Prender o Jogador!", 255, 255, 255, true ) end if Tempo_Selecionado == nil then return outputChatBox ( "Erro: Selecione um Tempo (Seg, Min etc) para Prender o Jogador!", 255, 255, 255, true ) end if Motivo_Prisao == "" or Motivo_Prisao == nil then return outputChatBox ( "Erro: Informe o Motivo da Prisão Corretamente para Prender o Jogador!", 255, 255, 255, true ) end local Converter_Jogador = getPlayerFromName ( Jogador_Selecionado ) if Converter_Jogador == localPlayer then return outputChatBox ( "Erro: Você não pode Prender você mesmo!", 255, 255, 255, true ) end local x, y, z = getElementPosition ( localPlayer ) -- Eu local x1, y1, z1 = getElementPosition ( Converter_Jogador ) -- Jogadores Proximos local Distancia = getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 ) if Distancia > 15 then return outputChatBox ( "Erro: Chegue mais Proximo do Jogador para Prende-lo!", 255, 255, 255, true ) end triggerServerEvent ( "AirNew_Enviar_Prisao", getLocalPlayer(), Jogador_Selecionado, SMHD_Selecionado, Tempo_Selecionado, Motivo_Prisao ) if guiGetVisible ( AirNew_Painel_Prender ) == true then AbrirFechar_Prisao () end elseif source == AirNew_Botao_Fechar then if guiGetVisible ( AirNew_Painel_Prender ) == true then AbrirFechar_Prisao () end end end end end addEventHandler ( "onClientGUIClick", getRootElement(), AirNew_Clicar_Botoes ) function Verificar_Fuga ( ) if isElementWithinMarker ( localPlayer, AirNew_Marker_Prisao ) and getElementData ( localPlayer, "AirNew_Preso" ) == "Não" then if isPedInVehicle ( localPlayer ) then triggerServerEvent ( "AirNewSCR_Remover_Jogador_Veiculo", localPlayer, localPlayer ) end setElementPosition ( localPlayer, 1553.81995, -1675.62549, 16.19531 ) setElementInterior ( localPlayer, 0 ) setElementDimension ( localPlayer, 0 ) setElementRotation ( localPlayer, 0, 0, 90 ) setTimer ( setCameraTarget, 50, 1, localPlayer ) elseif not isElementWithinMarker ( localPlayer, AirNew_Marker_Prisao ) and getElementData ( localPlayer, "AirNew_Preso" ) == "Sim" then if isPedInVehicle ( localPlayer ) then triggerServerEvent ( "AirNewSCR_Remover_Jogador_Veiculo", localPlayer, localPlayer ) end setElementPosition ( localPlayer, 242.242, 50.246, 1019.539 ) setElementInterior ( localPlayer, InteriorDP ) setElementDimension ( localPlayer, DimensaoDP ) setElementRotation ( localPlayer, 0, 0, 270 ) setTimer ( setCameraTarget, 50, 1, localPlayer ) end end setTimer ( Verificar_Fuga, 50, 0 ) function CronometroPrisao () if getElementData ( localPlayer, "AirNew_Preso" ) == "Sim" then Tempo_Preso = getElementData ( localPlayer, "AirNew_Tempo_Prisao" ) or 0 if tonumber ( Tempo_Preso ) > 0 then Tempo_Preso = Tempo_Preso - 1 setElementData ( localPlayer, "AirNew_Tempo_Prisao", tonumber(Tempo_Preso)) local horas_seg = 3600 local hora = math.floor(Tempo_Preso/horas_seg) local minuto = math.floor((Tempo_Preso-(horas_seg*hora))/60) local segundo = math.floor((Tempo_Preso-(horas_seg*hora)-(minuto*60))) if hora > 0 then Medida = "Hora(s)" elseif hora < 1 and minuto > 0 then Medida = "Minuto(s)" elseif hora < 1 and minuto < 1 and segundo > 0 then Medida = "Segundo(s)" end if hora == 9 then hora = "09" elseif hora == 8 then hora = "08" elseif hora == 7 then hora = "07" elseif hora == 6 then hora = "06" elseif hora == 5 then hora = "05" elseif hora == 4 then hora = "04" elseif hora == 3 then hora = "03" elseif hora == 2 then hora = "02" elseif hora == 1 then hora = "01" elseif hora == 0 then hora = "00" end exports.Scripts_OnMarkerMsgs_:create("Você sera Liberado em: "..hora..":"..string.format("%02d:%02d", minuto, segundo).." "..Medida.."") elseif tonumber ( Tempo_Preso ) <= 0 then Tempo_Preso = 0 exports.Scripts_OnMarkerMsgs_:delete() if not getElementData ( localPlayer, "AirNew_PagouFianca" ) == "Sim" then outputChatBox ( "Sucesso: Você cumpriu sua pena na Prisão, Agora você está Livre!", 255, 255, 255, true ) end setElementData ( localPlayer, "AirNew_Tempo_Prisao", tonumber(0) ) setElementData ( localPlayer, "AirNew_Preso", "Não" ) setElementData ( localPlayer, "AirNew_PagouFianca", "Não" ) end end end setTimer ( CronometroPrisao, 1000, 0 ) Verificar_Tempo_Capturado = false function ParaPrender_AirNewSCR ( ) Tempo_para_Prender = tonumber ( getElementData ( localPlayer, "PoliceToPrision:Time" ) ) or 0 if Tempo_para_Prender > 0 then Tempo_para_Prender = Tempo_para_Prender - 1 setElementData ( localPlayer, "PoliceToPrision:Time", tonumber ( Tempo_para_Prender ) ) local horas_seg = 3600 local hora = math.floor ( Tempo_para_Prender / horas_seg ) local minuto = math.floor ( ( Tempo_para_Prender - ( horas_seg * hora ) ) / 60 ) local segundo = math.floor ( ( Tempo_para_Prender - ( horas_seg * hora ) - ( minuto * 60 ) ) ) exports.Scripts_OnMarkerMsgs_:create2 ( "Tempo para levar o criminoso: "..string.format("%02d:%02d",minuto,segundo).." segundos") end if Tempo_para_Prender <= 0 then if Verificar_Tempo_Capturado == true then exports.Scripts_OnMarkerMsgs_:delete2 ( ) Tempo_para_Prender = 0 setElementData ( localPlayer, "PoliceToPrision:Time", tonumber(0) ) triggerServerEvent ( "AirNewSCR_FalharCapturaLiberar", getRootElement(), localPlayer ) Verificar_Tempo_Capturado = false return end end end setTimer ( ParaPrender_AirNewSCR, 1000, 0 ) Tempo_Prender = 0 function Mostrar_Tempo_Captura ( ) if Verificar_Tempo_Capturado == false then Verificar_Tempo_Capturado = true end end addEvent("ShowTimeParaPrender:Time", true ) addEventHandler("ShowTimeParaPrender:Time", getRootElement(), Mostrar_Tempo_Captura ) function Cancelar_Tempo_Captura ( ) if Verificar_Tempo_Capturado == true then exports.Scripts_OnMarkerMsgs_:delete2 ( ) setElementData ( localPlayer, "PoliceToPrision:Time", tonumber(0) ) Verificar_Tempo_Capturado = false end end addEvent ( "CancelTimeParaPrender:Time", true ) addEventHandler ( "CancelTimeParaPrender:Time", getRootElement ( ), Cancelar_Tempo_Captura )
  17. dei o comando, e mesmo assim quando eu dou o comando não aparece nem um erro '-'
  18. Tô ciente do aclGroupAddObject, já criei a ACL "Transportador" , tudo tá funcionando normal, menos abrir as rotas
  19. tenho um script de minha autoria que faz oq vc precisa, é facil de modificar ele. Pode usar ele, portanto que não remova os créditos Espero ter ajudado! Server: --[[ ################################################ # # # Script Criado Por # # [D]ener189 # # # # # ################################################ --]] ------------------------------------------------------------------------------------------------------------------------------------------------------ local predefinedHandling = { [411] = { --ID do Veiculo ["engineAcceleration"] = 35, ["dragCoeff"] = 0, ["maxVelocity"] = 260, --310Km ["tractionMultiplier"] = 0.8, ["tractionLoss"] = 1.1, }, [562] = { --Handler Drift ["driveType"] = "rwd", ["engineAcceleration"] = 200, ["dragCoeff"] = 1.5, ["maxVelocity"] = 202, ["tractionMultiplier"] = 0.7, ["tractionLoss"] = 0.8, ["collisionDamageMultiplier"] = 0.4, ["engineInertia"] = -175, ["steeringLock"] = 75, ["numberOfGears"] = 4, ["suspensionForceLevel"] = 0.8, ["suspensionDamping"] = 0.8, ["suspensionUpperLimit"] = 0.33, ["suspensionFrontRearBias"] = 0.3, ["mass"] = 1800, ["turnMass"] = 3000, ["centerOfMass"] = { [1]=0, [2]=-0.2, [3]=-0.5 }, }, } for i,v in pairs (predefinedHandling) do if i then for handling, value in pairs (v) do if not setModelHandling (i, handling, value) then outputDebugString ("* Predefined handling '"..tostring(handling).."' for vehicle model '"..tostring(i).."' could not be set to '"..tostring(value).."'") end end end end for _,v in ipairs (getElementsByType("vehicle")) do if v and predefinedHandling[getElementModel(v)] then for k,vl in pairs (predefinedHandling[getElementModel(v)]) do setVehicleHandling (v, k, vl) end end end function resetHandling() for model in pairs (predefinedHandling) do if model then for k in pairs(getOriginalHandling(model)) do setModelHandling(model, k, nil) end end end for _,v in ipairs (getElementsByType("vehicle")) do if v then local model = getElementModel(v) if predefinedHandling[model] then for k,h in pairs(getOriginalHandling(model)) do setVehicleHandling(v, k, h) end end end end end addEventHandler("onResourceStop", resourceRoot, resetHandling) Meta: <meta> <info author="[D]ener189" name="Handler" version="1.0" description="Velocidade Modificada Hurley Roleplay" type="script" /> <script src="handler.Lua" type="server"/> </meta>
  20. sim if getElementData (source, "HurleyRoleplay>Encaminhamento") == "Transportador" then setElementData (source, "HurleyRoleplay>Encaminhamento", false) setElementData (source, "Emprego", "Transportador")
  21. Olá peguei esse script da net que é um emprego de entregador de malotes, configurei as rotas tudo certo e pá, mas quando vai dar o comando para abrir, simplesmente não abre Cliente: local TransportadorTarget local TransportadorBlip local function clickToThrow(btn, state) if btn == "lalt" and state == true then if not isElement (TransportadorTarget) then removeEventHandler ("onClientKey", root, clickToThrow) else local localPos = {getElementPosition (localPlayer)} local targetPos = {getElementPosition (TransportadorTarget)} if getDistanceBetweenPoints3D (localPos[1], localPos[2], localPos[3], targetPos[1], targetPos[2], targetPos[3]) < 10 then local Transportador = createObject (1550, localPos[1], localPos[2] - 0.1, localPos[3] + 0.7) moveObject (Transportador, 400, targetPos[1], targetPos[2], targetPos[3]) setTimer (destroyElement, 3000, 1, Transportador) setElementCollisionsEnabled (Transportador, false) localPos = nil targetPos = nil clearTransportadorMission() triggerServerEvent ("payMeWhatYouOweMe", localPlayer) end end end end addEvent ("requestTransportadorjobStart", true) local function startTransportadorjob (locationTable) local randomLocation = locationTable[math.random(#locationTable)] TransportadorTarget = createMarker (randomLocation[1], randomLocation[2], randomLocation[3], "cylinder", 4, 255, 50, 50, 100) TransportadorBlip = createBlipAttachedTo (TransportadorTarget, 31) addEventHandler ("onClientKey", root, clickToThrow) --outputChatBox ( "Você Pegou Transportador, Siga o Checkpoint para Entregar!"--[[..getZoneName(randomLocation[1], randomLocation[2], randomLocation[3])--]], 255, 50, 50, true) end addEventHandler ("requestTransportadorjobStart", localPlayer, startTransportadorjob) function clearTransportadorboyMission() if isElement (TransportadorTarget) then destroyElement (TransportadorTarget) end if isElement (TransportadorBlip) then destroyElement (TransportadorBlip) end removeEventHandler ("onClientKey", root, clickToThrow) end addEventHandler ("onClientPlayerWasted", localPlayer, clearTransportadorMission) function removeHelmetOnExit ( vehicle, seat, jacked ) if isElement (TransportadorTarget) then destroyElement (TransportadorTarget) end if isElement (TransportadorBlip) then destroyElement (TransportadorBlip) end removeEventHandler ("onClientKey", root, clickToThrow) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), removeHelmetOnExit ) addEvent( "HurleyRoleplay:CancelarEmpregoTransportador", true ) addEventHandler( "HurleyRoleplay:CancelarEmpregoTransportador", localPlayer, removeHelmetOnExit ) Server: TransportadorPickup = createPickup ( 1088.438, 1913.967, 10.82, 3, 1210) MakerTransportador = createMarker ( 1088.438, 1913.967, 10.82, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MakerTransportador, TransportadorPickup, 0, 0, -1 ) MarkerSafeTransportador = createMarker ( 1080.761, 1919.251, 11.23, "cylinder", 20, 255, 255, 255, 0 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", TransportadorPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "profissao" cmd2 = "transportar" cmd3 = "hq" local HQTransportadorBlip = createBlip ( 1088.438, 1913.967, 10.82 ) setElementVisibleTo ( HQTransportadorBlip, root, false ) ------------------------------------------------------------------------------------------------------------------------------------------------------ function VerificarBlipEmprego(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end setElementVisibleTo ( HQTransportadorBlip, player, false ) end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Transportador" then return end VerificarBlipEmprego(pl) end end end, 3000,0) ------------------------------------------------------------------------------------------------------------------------------------------------------ function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Transportador" then if isElementVisibleTo ( HQTransportadorBlip, source ) then setElementVisibleTo ( HQTransportadorBlip, source, false ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Desmarcado do Mapa!", "info") else setElementVisibleTo ( HQTransportadorBlip, source, true ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Marcado no Mapa!", "info") end end end addCommandHandler ( cmd3, ComandoHQ ) ------------------------------------------------------------------------------------------------------------------------------------------------------ function AceitarEmprego07 (source) exports.Scripts_OnMarkerMsgs_:delete (source) unbindKey (source, LetraParaMarkers, "down", AceitarEmprego07) if getElementData (source, "HurleyRoleplay>Encaminhamento") == "Transportador" then setElementData (source, "HurleyRoleplay>Encaminhamento", false) setElementData (source, "Emprego", "Transportador") exports.Scripts_Dxmessages:outputDx (source, "Você Agora Trabalha de Transportador de Valores, Para Mais Informações Digite ( /Profissao )", "success") if not isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("Transportador")) then aclGroupAddObject (aclGetGroup("Transportador"), "user."..getAccountName (getPlayerAccount (source))) else exports.Scripts_Dxmessages:outputDx (source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end end function RecusarEmprego07 (source) exports.Scripts_OnMarkerMsgs_:delete (source) unbindKey (source, LetraParaMarkers, "down", RecusarEmprego07) if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("Transportador")) then aclGroupRemoveObject (aclGetGroup("Transportador"), "user."..getAccountName (getPlayerAccount (source))) if isElementVisibleTo (HQEntregadorDeJornalBlip, source) then setElementVisibleTo (HQEntregadorDeJornalBlip, source, false) end end removeElementData (source, "Emprego", "Transportador") if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("Transportador")) then aclGroupRemoveObject (aclGetGroup("Transportador"), "user."..getAccountName (getPlayerAccount (source))) else exports.Scripts_Dxmessages:outputDx(source, "Você se demitiu do emprego de Transportador de Valores com sucesso!", "warning") end end ------------------------------------------------------------------------------------------------------------------------------------------------------ Spawn = createMarker(1082.66, 1913.823, 10.82 -1,"cylinder", 1.9, 0, 255, 0, 99) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end veh = {} function spawnvtr ( thePlayer, comando, nick ) if veh[thePlayer] and isElement( veh[thePlayer] ) then destroyElement ( veh[thePlayer] ) veh[thePlayer] = nil end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Transportador") ) then veh[thePlayer] = createVehicle(498, 1081.771, 1922.637, 11.205, -0, 0, 354.788) warpPedIntoVehicle ( thePlayer, veh[thePlayer] ) exports.Scripts_Dxmessages:outputDx(thePlayer, "Veiculo criado com sucesso", "success") else exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Transportador de Valores!", "warning") end end addEventHandler("onMarkerHit", Spawn, spawnvtr) ------------------------------------------------------------------------------------------------------------------------------------------------------ function emarker(marker,md) if (md) then if isPedInVehicle ( source ) then return end if marker == MakerTransportador then if getElementData ( source, "Emprego" ) == "Transportador" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Transportador de Valores") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego07 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Transportador de Valores") bindKey ( source, LetraParaMarkers, "down", AceitarEmprego07 ) end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == MakerTransportador then exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego07 ) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego07 ) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker) ------------------------------------------------------------------------------------------------------------------------------------------------------ function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Transportador" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09AComandos da Profissão de Transportador de Valores", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/HQ #ffffff- #9ABDE0Para Marcar / Desmarcar o seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/Transportar #ffffff- #9ABDE0Para Iniciar a Entrega dos Malotes", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444ALT Esquerdo #ffffff- #9ABDE0Entrega o Malote no Marker da Entrega", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #FFD700Entre no Caminão de Valores, Digite /Transportar e Siga os Checkpoints!", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) end end addCommandHandler(cmd1, ComandosProf ) -- local moneyPerTransportador = 10000 local TransportadorSkins = { [71]=true; } local TransportadorVehicles = { [498]=true; } -- Note that location name must correspond to the area in San Andreas you'd like Job available in, for example: ["RC"] won't work, instead, put ["Red County"] local locations = { ["San Andreas"] = { { 2534.708, 1969.196, 11.224 -1}; { 2189.125, 2459.45, 11.127 -1}; { 2106.925, 901.697, 11.232 -1}; { -5.474, 1193.666, 19.211 -1}; { -823.825, 1496.641, 19.253 -1}; { -1534.713, 2605.708, 55.686 -1}; { -2491.248, 2335.734, 4.836 -1}; { -2359.108, 1003.349, 50.703 -1}; { -2011.403, 443.272, 35.016 -1}; { -2599.528, 25.445, 4.18 -1}; { -1803.874, -127.844, 5.58 -1}; { 228.301, -187.859, 1.43 -1}; { 658.364, -576.345, 16.336 -1}; { 1383.188, 264.063, 19.57 -1}; { 2365.264, 86.898, 26.341 -1}; { 1052.542, -1136.714, 23.656 -1}; { 767.607, -1324.25, 13.391 -1}; { 1822.777, -1560.236, 13.367 -1}; { 1932.181, -1769.308, 13.383 -1}; }; } local function initializeOnVehicleEnter (p, s) --if p and s == 0 and pizzaSkins[getElementModel(p)] and pizzaVehicles[getElementModel(source)] then if getElementData ( p, "Emprego" ) == "Transportador" then if isElementWithinMarker( p, MarkerSafeTransportador) then local sourcePos = {getElementPosition(p)} local playerZone = getZoneName (sourcePos[1], sourcePos[2], sourcePos[3], true) if locations[playerZone] then triggerClientEvent (p, "requestTransportadorjobStart", p, locations[playerZone]) exports.Scripts_Dxmessages:outputDx( p, "Você Pegou os Malotes, Siga o Checkpoint para Entregar!", "info") --outputChatBox ("* PIZZA * Dica:#FFFFFF Utilize o Botão esquerdo do Mouse para Entregar a Pizza!", p, 255, 50, 50, true) end sourcePos = nil playerZone = nil end end end --addEventHandler ("onVehicleEnter", root, initializeOnVehicleEnter) addCommandHandler (cmd2, initializeOnVehicleEnter) addEvent ("payMeWhatYouOweMe", true) local function payMeWhatYouOweMe() givePlayerMoney (client, moneyPerTransportador) exports.Scripts_Dxmessages:outputDx(client, "Você recebeu $"..moneyPerTransportador.." Por Entregar um Malote, Siga Para a Proxima Entrega!", "success") setTimer (function(client) if not client then return end local sourcePos = {getElementPosition(client)} local playerZone = getZoneName (sourcePos[1], sourcePos[2], sourcePos[3], true) triggerClientEvent (client, "requestTransportadorjobStart", client, locations[playerZone]) sourcePos = nil playerZone = nil end, 1500, 1, client) end addEventHandler ("payMeWhatYouOweMe", root, payMeWhatYouOweMe) function removeHelmetOnExit ( thePlayer, seat, jacked ) triggerClientEvent ( "HurleyRoleplay:CancelarEmpregoTransportador", thePlayer ) end addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit ) ------------------------------------------------------------------------------------------------------------------------------------------------------
  22. Oq tem de tem de errado? [2019-09-04 12:39:03] ERROR: s_anticheat.Lua:21: exports: Call to non-running server resource (pool) [string "?"] [2019-09-04 12:39:03] ERROR: s_anticheat.Lua:22: bad argument #1 to 'ipairs' (table expected, got nil) function showSpeedToAdmins(velocity) kph = math.ceil(velocity * 1.609344) exports.global:sendMessageToAdmins("[Possible Speedhack/HandlingHack] " .. getPlayerName(client) .. ": " .. velocity .. "Mph/".. kph .." Kph") end addEvent("alertAdminsOfSpeedHacks", true) addEventHandler("alertAdminsOfSpeedHacks", getRootElement(), showSpeedToAdmins) function showDMToAdmins(kills) exports.global:sendMessageToAdmins("[Possible DeathMatching] " .. getPlayerName(client) .. ": " .. kills .. " kills in <=2 Minutes.") end addEvent("alertAdminsOfDM", true) addEventHandler("alertAdminsOfDM", getRootElement(), showDMToAdmins) -- [MONEY HACKS] function scanMoneyHacks() local tick = getTickCount() local hackers = { } local hackersMoney = { } local counter = 0 local players = exports.pool:getPoolElementsByType("player") for key, value in ipairs(players) do local logged = getElementData(value, "loggedin") if (logged==1) then if not (exports.integration:isPlayerTrialAdmin(value)) then -- Only check if its not an admin... local money = getPlayerMoney(value) local truemoney = exports.global:getMoney(value) if (money) then if (money > truemoney) then counter = counter + 1 hackers[counter] = value hackersMoney[counter] = (money-truemoney) end end end end end local tickend = getTickCount() local theConsole = getRootElement() for key, value in ipairs(hackers) do local money = hackersMoney[key] local accountID = getElementData(value, "account:id") local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) outputChatBox("AntiCheat: " .. targetPlayerName .. " was auto-banned for Money Hacks. (" .. tostring(money) .. "$)", getRootElement(), 255, 0, 51) end end setTimer(scanMoneyHacks, 3600000, 0) -- Every 60 minutes
  23. I'm a professional Mapper, contact me at discord dener189$3280
  24. Desculpe por apenas copiar e colar, estava com pressa e apenas queria ver se assim seria eficaz. Essas linhas estão perfeitas, funcionou certinho
×
×
  • Create New...