Jump to content

Search the Community

Showing results for tags 'ajuda'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. Alguém me ajuda com este erro? https://prnt.sc/tzlgx1 Aqui está aonde eu exportei a função do resource Scripts_Dxmessages 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) exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi removido.", source, 38, 122, 216, true) else exports.Scripts_Dxmessages:outputDx ("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true) end else exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) O erro está se referindo aqui: function outputDx(player, text, type) if (player and text and type) then triggerClientEvent(player, 'Server:CallNotifications', resourceRoot, text, type); end end
  2. Eu gostaria de saber o por que quando eu vou spawnar o veículo, ele fica de lado, e não reto como faço pra arrumar isto? Posição: 1016.727355957,-1991.0718994141,13.929684638977
  3. Pessoal, baixei o MTA hoje (05/08/2020) e tô na dúvida se tanto ele como o GTA SA contém vírus, pf me ajudem!
  4. Olá pessoal eu estou com uma duvida, como eu posso estar fazendo para que o player passa-se em um maker só caso ele tenha pego aquela profissão? Ex: o emprego funcione caso ele pega na agencia.
  5. Estou começando a programar em Lua e no MTA agora, estou fazendo meu primeiro mod e não sei o que está errado. É um mod muito simples, só de ligar e desligar o motor do carro com a letra K e desligar quando entra e sai do veículo. function desligarMotor (source) local veiculo if ( getElementType(source) == "vehicle" ) then veiculo = source end if ( getElementType(source) == "player" ) then veiculo = getElementData ( source, "cl_ownedvehicle" ) end if ( getVehicleEngineState ( veiculo ) == true ) then setVehicleEngineState (veiculo, false) end end function mudarMotor() local veiculo if ( getElementType(source) == "vehicle" ) then veiculo = source end if ( getElementType(source) == "player" ) then veiculo = getElementData ( source, "cl_ownedvehicle" ) end local estado = getVehicleEngineState (veiculo) if estado == false then setVehicleEngineState (veiculo, true) end else setVehicleEngineState (veiculo, false) end end bindKey ( source, "k", "down", mudarMotor ) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), desligarMotor ) addEventHandler ( "onPlayerVehicleExit", getRootElement(), desligarMotor )
  6. Opa, estou precisando de uma ajuda por que, O SAMU consegue floodar o /curar um monte de vez enquanto tiver um jogador caído, assim ganhando muito dinheiro, e eu gostaria que alguém me ajudasse a como resolver esse problema, que tipo o SAMU pode dar 1 vez só em um jogador caído, algo assim, se alguém puder me ajudar, estarei enviando o script aqui: addEventHandler("onResourceStart", resourceRoot, function() for i,v in ipairs(getElementsByType('player')) do setElementData(v, "data.playerID", i) end end ) addEventHandler("onPlayerJoin", root, function() for i,v in ipairs(getElementsByType('player')) do setElementData(v, "data.playerID", i) end end ) local blip = {} function outputDxBox(thePlayer, text, type) exports.Scripts_Dxmessages:outputDx(thePlayer, text, type) end function getPlayerFromPartialName ( id ) for i, player in ipairs ( getElementsByType ( "player" ) ) do local id_do_player = getElementData ( player, "ID" ) or false if id_do_player == tonumber(id) then return player end end return false end function setPlayerFallen(player, state) if state == true then toggleAllControls(player, false) toggleControl(player, "chatbox", true) setElementHealth(player, 35) setElementData(player, "playerFallen", true) setElementFrozen(player, true) triggerClientEvent(player, "startDeadTime", player) end if state == false then setElementHealth(player, 35) triggerClientEvent(player, "stopDeadTime", player) toggleAllControls(player, true) setElementData(player, "playerFallen", false) setElementFrozen(player, false) end end function checkData() for i, player in pairs (getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("SAMU")) then if not getElementData(player, "jobSAMU") then setElementData(player, "jobSAMU", true) end end end end addEventHandler("onPlayerLogin", root, checkData) addEventHandler("onPlayerSpawn", root, checkData) addEventHandler("onResourceStart", resourceRoot, checkData) function checkHealth() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "playerFallen") then local conta = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup("user."..conta, aclGetGroup("SAMU")) then if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpFallen then removePedFromVehicle(player) setPlayerFallen(player, true) setPedAnimation(player, "SWEET", "Sweet_injuredloop", 1000, false, false, false, true) triggerClientEvent(player, "startDeadTime", player) outputDxBox(player, 'Digite "/192" e espere que um SAMU venha e o cure ou morrerá em 3 minutos.', "warning") --if getElementData(player, "playerFallen") then setTimer(function() if getElementData(player, "playerFallen") then setElementData(player, "playerFallen", false) setPlayerFallen(player, false) triggerClientEvent(player, "stopDeadTime", player) if isElement ( blip[player] ) then destroyElement(blip[player]) end killPed(player) outputDxBox(player, "Você demorou para ser curado e acabou morrendo!", "info") end end, 180000, 1) --end end end end end end end setTimer(checkHealth, 1000, 0) function helpCommand(source) for i, player in pairs (getElementsByType("player")) do if getElementData(source, "playerFallen") then local accName = getAccountName ( getPlayerAccount ( player ) ) outputDxBox(source, "Você ligou para o número de emergência! Aguarde.", "info") if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMU" ) )) then outputChatBox("#00ff00[SAMU] #FFFFFFO jogador "..getPlayerName(source).." #FFFFFFestá pedindo socorro! Procurem o blip de coração.", player, 255, 255, 255, true) outputChatBox("#00ff00[SAMU] #FFFFFFO ID da chamada é: #00ff00("..getElementData(source, "data.playerID")..")", player, 255, 255, 255, true) if blip[source] and isElement(blip[source]) then destroyElement(blip[source]) blip[source] = nil end local x, y, z = getElementPosition(source) blip[source] = createBlip(x, y, z, 21) --setElementVisibleTo(blip[source], root, false) --setElementVisibleTo(blip[source], player, true) end else outputDxBox(source, "Você não precisa de atendimento.", "error") end end end addCommandHandler("192", helpCommand) function onWasted(killer) if getElementData(source, "playerFallen") then setPlayerFallen(source, false) setElementData(source, "playerFallen", false) triggerClientEvent(source, "stopDeadTime", source) if blip[source] and isElement(blip[source]) then destroyElement(blip[source]) blip[source] = nil end end end addEventHandler("onPlayerWasted", root, onWasted) function onQuit() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "playerFallen") then if blip[player] and isElement(blip[player]) then destroyElement(blip[player]) blip[player] = nil end end end end addEventHandler("onPlayerQuit", root, onQuit) function secret() for i, player in pairs (getElementsByType("player")) do setPlayerFallen(player, false) end end addCommandHandler("vzrapollo", secret) function curarPlayer(thePlayer, command, nameP) if nameP then if getPlayerFromPartialName(nameP) then local conta = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..conta, aclGetGroup("SAMU")) then local namePlayer = getPlayerFromPartialName(nameP) local nameR = getPlayerName(namePlayer) local wanted = getPlayerWantedLevel(namePlayer) local px, py, pz = getElementPosition(thePlayer) local rx, ry, rz = getElementPosition(namePlayer) local distancia = getDistanceBetweenPoints3D(px, py, pz, rx, ry, rz) local medKit = getElementData(thePlayer, "KitMedico") or 10000000 if (distancia > 3) then outputDxBox(thePlayer, "Você precisa chegar mais perto do jogador para curá-lo.", "error") elseif (distancia < 2) then if getElementData(namePlayer, "playerFallen") then setPedAnimation(thePlayer, "BOMBER", "BOM_Plant", 1000, false) if isElement ( blip[namePlayer] ) then destroyElement(blip[namePlayer]) end outputDxBox(thePlayer, "Curando jogador...", "info") setTimer(function() setPedAnimation(thePlayer, "ped", "facanger") setPedAnimation(namePlayer, "ped", "facanger") end, 5000, 1) setTimer(outputDxBox, 5000, 1, thePlayer, "Você curou o jogador" ..nameR.. "e ganhou R$1.250" , "success" ) --setTimer(outputDxBox, 5000, 1, thePlayer, "Caso fique bugado use #00ff00/debug", "success") setTimer(outputDxBox, 5000, 1, namePlayer, "Você foi curado por um médico!", "success") --setTimer(outputDxBox, 5000, 1, namePlayer, "Caso fique bugado use #00ff00/debug!", "success") setTimer(givePlayerMoney, 5000, 1, thePlayer, 1250) setTimer(setPlayerFallen, 5000, 1, namePlayer, false) setTimer(function() setElementData ( thePlayer, "AirNewSCR_LiberarXP", "Sim" ) setPedAnimation ( thePlayer ) setPedAnimation ( namePlayer ) end, 6000, 1) else outputDxBox(thePlayer, "O jogador não precisa ser curado.", "error") end end else outputDxBox(thePlayer, "Permissão negada para teste comando!", "error") end end else outputDxBox(thePlayer, "Erro! O correto é /curar Nome", "error") end end addCommandHandler("curar", curarPlayer)
  7. Buenas Gente Necesito ayuda para que al spawnear un vehiculo atravez de un panel y quiera spawnear otro se borre el anterior Gracias
  8. Olá a todos criei um script de invisibilidade e queria saber se e possível deixar o ID do player invisível juntamente com o player.
  9. O Erro É Na Linha 284, No debugscript 3 aparece como bad argument #1 to 'gsub' (string expected, got boolean) function penz_darabolas(amount) local formatted = amount while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1 %2') if (k==0) then break end end return formatted end
  10. Aew galera tô com uma dúvida, eu queria saber se eu instalar mods no meu GTA SA pra jogar o single player (é a pasta que eu usei pra instalar o MTA), vai interferir de alguma forma ou dar algum problema no mta... vlw
  11. Boa Tarde , eu coloquei um mod de ativa resource sozinho. Tranquilo ate ai tudo legal porem nao gostei muito desse mod então resolvi tirar Agora quando tendo ativar algum mapa nao ativo ai entro no console para ver oque esta dando e aparece isso : Link : http://prntscr.com/sc9lwy Por favorr me ajudem
  12. Opa, salve pessoa que puder me ajudar, seguinte eu criei um servidor de mta recentemente e tinha um mod de assalto de loja que estava bugado, resolvi remove-lo e trocar por outro mais genérico porém, esse que eu tinha antigamente tinha umas lojinhas que eu queria usar, então removi as portas delas no editor de mapas e gostaria de saber como monto um script que cria um marker para eu poder roubar estas lojinhas
  13. estou tentando por um vídeo em vez de uma imagem (Exemplo o "Se Fodeu") quando o player morre, mas não esta indo, alguém ajuda ae?
  14. Boa tarde, caros usuários da F.MTA! Então pessoal, estou com um problema pra adicionar a função de comandos ao usar o chat local, eu gostaria de saber se algum programador poderia me explicar o que adicionar ou modificar? esse é o código / script: chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"t","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"t","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("#00ff00[ Local ] #ffffff"..nick..": #FFFFFF"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat) Quem puder me ajudar agradeço dês de já. Att: ~ Zeus.
  15. victor003

    network trouble

    ola! sou um dos jogadores do mta, e venho relatar um problema que vem acontecendo quando entro em um servidor. onde ao entrar jogo tranquilamente e depois de um tempo recebo network trouble, que vem sendo constantemente e queria ajuda pra como resolver. a imagem abaixo não sou eu, apenas um exemplo do que acontece.(onde depois disso o servidor cai)
  16. Alguém pode me ajudar, não consigo localizar a tecla ou comando que abre este painel gui link.
  17. Esse mod esta dando conflito com o mesmo mod, pq quando eu estou colocando ele numa base, e depois for colco ar em outra ele esta dando conflito com eles mesmo queria saber como poderia arrumar esse bugs desse script, esse mod não e meu e também nao tem aturo pois ja vi varias paginas come esse mod e não tem nenhum autor fixo!!!, http://www.mtabrasil.com.br/2019/10/gerenciador-de-base-bca.html preciso de muita ajuda mesmo espero que tenham paciencia para me ajudar por favor !!! script: servidor carro1 = {} carro2 = {} carro3 = {} local Protecao = "PMERJ" -- ACL da protecao, se o player nao tiver nela, o alarme joga ele pra fora da base local Acesso_ADM = "..." --- Acesso a base e gerenciador sem precisar colocar a senha local id_skin1, id_skin2, id_skin3 = 285, 156, 133 -- 3 skins local id_carro1, id_carro2, id_carro3 = 596, 521, 402 -- 3 carros local carro_1, carro_2, carro_3 = true, true, false --- true = sim , false = nao local skin_1, skin_2, skin_3 = true, false, false local alarme = false --- /// PROTECAO BASE RestricLocation = {} TeleportLocation = {} RestricLocation["location1"] = {1751.9000244141,-1942,30.60000038147} -- Local 1 RestricLocation["location2"] = {1811.0999755859,-1881.1999511719,13.60000038147} -- Local 2 TeleportLocation = {1821.6999511719,-1920,13.39999961853} MsgInvasao = "Base da PMERJ, Ja foi chamado a policia." --- /// PORTAO BASE local idportao = 980 portao = {1810.7998046875,-1889.099609375 ,15.39999961853 , 0, 0, 90} --- /// TELEPORTE POR COMANDO DO GERENCIADOR Teleporte_BASE = {} Teleporte_BASE = {1774.9443359375,-1936.95703125,12.667187690735} --- Teleporte pelo comando do gerenciador local marker = createMarker ( 1774.9443359375,-1936.95703125,12.667187690735, "cylinder", 2, 0, 0, 255, 150) --- Coordenadas do Gerenciador function Abrir_painel (source) triggerClientEvent (source, "Event_Painel", root) triggerEvent ("Password", source) triggerEvent ("AlamrConf", source) end addEventHandler ("onMarkerHit", marker, Abrir_painel) function onResourceStart() for k, v in ipairs(getElementsByType("player")) do local account = getPlayerAccount(v) if account and not isGuestAccount(account) then if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup(Acesso_ADM)) then setElementData(v,"AcessoPainel",true) end end end end addEventHandler("onResourceStart",resourceRoot,onResourceStart) function onPlayerLogin(_,account) local accName = getAccountName(account) if isObjectInACLGroup("user."..accName, aclGetGroup(Acesso_ADM))then setElementData(source,"AcessoPainel",true) end end addEventHandler("onPlayerLogin",root,onPlayerLogin) --- /// VEICULOS function Veiculo_1 () if carro_1 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido esse veiculo.",source,255,255,255,true) return end if carro1[source] and isElement( carro1[source] ) then destroyElement( carro1[source] ) carro1[source] = nil end local x,y,z = getElementPosition(source) carro1[source] = createVehicle(id_carro1, x,y,z) warpPedIntoVehicle (source,carro1[source]) setVehicleDamageProof(getPedOccupiedVehicle(source),true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o veiculo 1.",source,255,255,255,true) end addEvent("Veiculo_1",true) addEventHandler("Veiculo_1",root,Veiculo_1) function Destruir_carro1 () if carro1[source] and isElement( carro1[source] ) then destroyElement (carro1[source]) end end --addEventHandler ("onPlayerLogout", root, Destruir_carro1) --addEventHandler ("onPlayerQuit", root, Destruir_carro1) --addEventHandler ("onPlayerWasted", root, Destruir_carro1) addEvent("Veiculo_1_Destruir",true) addEventHandler("Veiculo_1_Destruir",root,Destruir_carro1) function Veiculo_2 () if carro_2 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido esse veiculo.",source,255,255,255,true) return end if carro2[source] and isElement( carro2[source] ) then destroyElement( carro2[source] ) carro2[source] = nil end local x,y,z = getElementPosition(source) carro2[source] = createVehicle(id_carro2, x,y,z) warpPedIntoVehicle (source,carro2[source]) setVehicleDamageProof(getPedOccupiedVehicle(source),true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o veiculo 2.",source,255,255,255,true) end addEvent("Veiculo_2",true) addEventHandler("Veiculo_2",root,Veiculo_2) function Destruir_carro2 () if carro2[source] and isElement( carro2[source] ) then destroyElement (carro2[source]) end end --addEventHandler ("onPlayerLogout", root, Destruir_carro2) --addEventHandler ("onPlayerQuit", root, Destruir_carro2) --addEventHandler ("onPlayerWasted", root, Destruir_carro2) addEvent("Veiculo_2_Destruir",true) addEventHandler("Veiculo_2_Destruir",root,Destruir_carro2) function Veiculo_3 () if carro_3 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido esse veiculo.",source,255,255,255,true) return end if carro3[source] and isElement( carro3[source] ) then destroyElement( carro3[source] ) carro3[source] = nil end local x,y,z = getElementPosition(source) carro3[source] = createVehicle(id_carro3, x,y,z) warpPedIntoVehicle (source,carro3[source]) setVehicleDamageProof(getPedOccupiedVehicle(source),true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o veiculo 3.",source,255,255,255,true) end addEvent("Veiculo_3",true) addEventHandler("Veiculo_3",root,Veiculo_3) function Destruir_carro3 () if carro3[source] and isElement( carro3[source] ) then destroyElement (carro3[source]) end end --addEventHandler ("onPlayerLogout", root, Destruir_carro3) --addEventHandler ("onPlayerQuit", root, Destruir_carro3) --addEventHandler ("onPlayerWasted", root, Destruir_carro3) addEvent("Veiculo_3_Destruir",true) addEventHandler("Veiculo_3_Destruir",root,Destruir_carro3) --- /// SKINS function skin1 () if skin_1 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin1) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a skin 1.",source,255,255,255,true) end addEvent("Skin_Event_1",true) addEventHandler("Skin_Event_1",root,skin1) function skin2 () if skin_2 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin2) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a skin 2.",source,255,255,255,true) end addEvent("Skin_Event_2",true) addEventHandler("Skin_Event_2",root,skin2) function skin3 () if skin_3 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin3) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a skin 3.",source,255,255,255,true) end addEvent("Skin_Event_3",true) addEventHandler("Skin_Event_3",root,skin3) --- /// ARMAS function Armas_1 () giveWeapon(source, 23, 500) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a tazer.",source,255,255,255,false) end addEvent ("Armas_1", false) addEventHandler ("Armas_1", root, Armas_1) function Armas_2 () giveWeapon(source, 14, 500 ) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a Tear Gás.",source,255,255,255,false) end addEvent ("Armas_2", false) addEventHandler ("Armas_2", root, Armas_2) function Armas_3 () giveWeapon(source, 44, 1 ) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o Night Vision.",source,255,255,255,false) end addEvent ("Armas_3", false) addEventHandler ("Armas_3", root, Armas_3) --- /// ALTERAR SENHA GERENCIADOR function trocar_senha(senha_nova) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Gerenciador", 0) xmlNodeSetValue(markernode, tostring(senha_nova)) Gerenciador = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) triggerEvent ("Password", source) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Senha do gerenciador alterada para: '#00FF00"..senha_nova.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Change_pass", true) addEventHandler ("Change_pass", getRootElement(), trocar_senha) function validar_senha() senha = Gerenciador triggerClientEvent (source, "Senha_Portao", root, senha) end addEvent ("Password", true) addEventHandler ("Password", getRootElement(), validar_senha) --- /// ALTERAR SENHA PORTAO function trocar_senha_portao(senha_nova) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Base", 0) xmlNodeSetValue(markernode, tostring(senha_nova)) Base = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Senha do portão alterada para: '#00FF00"..senha_nova.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Change_pass_portao", true) addEventHandler ("Change_pass_portao", getRootElement(), trocar_senha_portao) --- /// ALTERAR TELEPORT function trocar_teleport(tele_novo) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Teleporte", 0) xmlNodeSetValue(markernode, tostring(tele_novo)) Teleporte = xmlNodeGetValue ( markernode ) removeEventHandler(""..Teleporte.."",Tele) addCommandHandler(""..Teleporte.."",Tele) xmlSaveFile(config) xmlUnloadFile(config) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Teleporte alterado para: '#00FF00"..tele_novo.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Trocar_teleport", true) addEventHandler ("Trocar_teleport", getRootElement(), trocar_teleport) function Tele (source) setElementPosition (source, Teleporte_BASE[1], Teleporte_BASE[2], Teleporte_BASE[3] ) end --- /// ALTERAR TAG function trocar_tag(tag_nova) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Tag", 0) xmlNodeSetValue(markernode, tostring(tag_nova)) Tag = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: A tag foi alterada para: '#00FF00"..tag_nova.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Trocar_tag", true) addEventHandler ("Trocar_tag", getRootElement(), trocar_tag) function chatbox(text, msgtype) local new = "" local iter = 0 msg = string.gsub(text,"ـ","") for word in msg:gmatch("%S+") do iter = iter + 1 if iter == 1 and word:len() > 0 then word = word:gsub("%a",string.upper,1) end new = new..word.." " end if new ~= "" then msg = new end text = msg local root = getRootElement() local name = getPlayerName(source) login = getAccountName(getPlayerAccount(source)) end addEventHandler("onPlayerChat", root, chatbox) --- /// DAR TAG addEvent("MoverACL",true) function MoverplayertoACL(player, groupname) local account = getPlayerAccount(player) if ( not isGuestAccount ( account ) ) then local group = aclGetGroup ( groupname ) if ( group ) then local isInACLGroup = isObjectInACLGroup ( "user." .. getAccountName ( account ), group) if ( not isInACLGroup ) then aclGroupAddObject ( group, "user."..getAccountName ( account ) ) setElementData(player,"Tag_PainelBase",true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff foi adicionado no grupo "..groupname..".", source, 255, 255 ,255 ,true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff você foi adicionado ao grupo "..groupname..".", player, 255, 255 ,255 ,true) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user."..getAccountName ( account ) ) setElementData(player,"Tag_PainelBase",false) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff foi removido do grupo "..groupname..".", source, 255, 255 ,255 ,true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff você foi removido do grupo "..groupname..".", player, 255, 255 ,255 ,true) end else outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: O grupo #FFFFFF" .. groupname .. "#ffffff não existe.", source, 255, 255 ,255 ,true) end else outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Erro, o jogador não está logado.", source, 255, 255 ,255 ,true) end end addEventHandler("MoverACL", getRootElement(), MoverplayertoACL) -- /// ALARME ON function Alarme_on() local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Alarme", 0) xmlNodeSetValue(markernode, "true") Alerta = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) triggerEvent ("AlamrConf", source) triggerClientEvent (root, "Alarme_Painel", root) alarme = true end addEvent("Alarme_on",true) addEventHandler("Alarme_on", getRootElement(), Alarme_on) --- /// ALARME OFF function Alarme_off() local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Alarme", 0) xmlNodeSetValue(markernode, "false") Alerta = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) triggerEvent ("AlamrConf", source) triggerClientEvent (root, "Alarme_Painel_OFF", root) alarme = false end addEvent("Alarme_off",true) addEventHandler("Alarme_off", getRootElement(), Alarme_off) function alarmeconf() evento = Alerta triggerClientEvent (source, "Alarme_Config", root, evento) end addEvent ("AlamrConf", true) addEventHandler ("AlamrConf", getRootElement(), alarmeconf) --- /// PROTECAO BASE ColCuboid = false EnableVehicleGodMode = true HabilitarAdmin = false GodMode = true NaoAtirar = false --------------------------------------- CONFIGS -------------------------------------------- function sendMsg(iplayer,msg) outputChatBox ( msg, iplayer, 255, 0, 0, true ) end function EnterPlace ( theElement ) triggerEvent ("AlamrConf", root) local veh = getPedOccupiedVehicle(theElement) local accName = getAccountName(getPlayerAccount(theElement)) if HabilitarAdmin == true then if ( hasObjectPermissionTo ( PlayerID, "command.mute", true ) ) then return end end if alarme == false then return end if (getElementType ( theElement ) == "player") and (PlayerHaveLevel (theElement) == false) then sendMsg(theElement,MsgInvasao) if veh then setElementPosition( veh, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) triggerClientEvent (root, "Alarme_Painel", root) else setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) triggerClientEvent (root, "Alarme_Painel", root) end sendMsgOwners(theElement) elseif getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,true) end end function ExitPlace ( theElement ) if GodMode == true then setElementData(theElement,"blood",12000) end if NaoAtirar == true then toggleControl(theElement, "fire", true) toggleControl(theElement, "vehicle_fire", true) toggleControl(theElement, "vehicle_secondary_fire", true) toggleControl(theElement, "aim_weapon", true) end if getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,false) end end function PlayerHaveLevel( PlayerID ) login = getAccountName(getPlayerAccount(PlayerID)) if isObjectInACLGroup("user."..login, aclGetGroup(Protecao)) or isObjectInACLGroup("user."..login, aclGetGroup(Acesso_ADM)) or getElementData(PlayerID,"Tag_PainelBase") then if GodMode == true then setElementData(PlayerID,"blood",999999999999999) end if NaoAtirar == true then toggleControl (PlayerID, "fire", false) toggleControl (PlayerID, "vehicle_fire", false) toggleControl (PlayerID, "vehicle_secondary_fire", false) toggleControl (PlayerID, "aim_weapon", false) end return true else return false end end function ResourceStart( ) LoadLocations() CreateCollision() end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ),ResourceStart) function LoadLocations() local RX, RY, RZ, WRX, WRX, WRX if(RestricLocation["location1"][1] > RestricLocation["location2"][1]) then RestricLocation["maxx"] = RestricLocation["location1"][1] RestricLocation["minx"] = RestricLocation["location2"][1] else RestricLocation["maxx"] = RestricLocation["location2"][1] RestricLocation["minx"] = RestricLocation["location1"][1] end if(RestricLocation["location1"][2] > RestricLocation["location2"][2]) then RestricLocation["maxy"] = RestricLocation["location1"][2] RestricLocation["miny"] = RestricLocation["location2"][2] else RestricLocation["maxy"] = RestricLocation["location2"][2] RestricLocation["miny"] = RestricLocation["location1"][2] end if(RestricLocation["location1"][3] > RestricLocation["location2"][3]) then RestricLocation["maxz"] = RestricLocation["location1"][3] RestricLocation["minz"] = RestricLocation["location2"][3] else RestricLocation["maxz"] = RestricLocation["location2"][3] RestricLocation["minz"] = RestricLocation["location1"][3] end end function CreateCollision() RX = RestricLocation["minx"] WRX = RestricLocation["maxx"] - RestricLocation["minx"] RY = RestricLocation["miny"] WRY = RestricLocation["maxy"] - RestricLocation["miny"] RZ = RestricLocation["minz"] WRZ = RestricLocation["maxz"] - RestricLocation["minz"] ColCuboid = createColCuboid ( RX, RY, RZ, WRX, WRY, WRZ ) if ColCuboid then addEventHandler ( "onColShapeHit", ColCuboid, EnterPlace ) addEventHandler ( "onColShapeLeave", ColCuboid, ExitPlace ) else outputDebugString("Erro, verifique: location1 e location2") end end function ResourceStop( ) destroyElement ( ColCuboid ) end addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ),ResourceStop) function sendMsgOwners( PlayerID ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if(PlayerHaveLevel (aPlayer) == true) then sendMsg(aPlayer,"#FFFFFFO jogador " ..getPlayerName ( PlayerID ) .."#FFFFFF está tentando invadir a base.") end end end function SetVehicleGodMode( VehicleID, godEoD ) if EnableVehicleGodMode == true then setElementData(VehicleID, "godmode", godEoD) setVehicleDamageProof (VehicleID, godEoD ) end end --- /// SALVAR CONFIGURACOES local nodes = { "Tag", "Teleporte", "Gerenciador", "Base", "Alarme" } if not fileExists("gerenciador/configuracoes.xml") then local node = xmlCreateFile("gerenciador/configuracoes.xml","Configuracoes") for ind, nn in ipairs(nodes) do local child = xmlCreateChild( node, tostring(nn)) end xmlSaveFile(node) xmlUnloadFile(node) outputDebugString("Configuracoes do painel base foram criadas com sucesso.") end function event() triggerEvent ("AlamrConf", root) end function Config_load () xml = xmlLoadFile ( "gerenciador/configuracoes.xml" ) local node = xmlFindChild( xml, "Tag", 0 ) local node_2 = xmlFindChild( xml, "Teleporte", 0 ) local node_3 = xmlFindChild( xml, "Gerenciador", 0 ) local node_4 = xmlFindChild( xml, "Base", 0 ) local node_5 = xmlFindChild( xml, "Alarme", 0 ) Tag = xmlNodeGetValue ( node ) Teleporte = xmlNodeGetValue ( node_2 ) Gerenciador = xmlNodeGetValue ( node_3 ) Base = xmlNodeGetValue ( node_4 ) Alerta = xmlNodeGetValue ( node_5 ) addCommandHandler(""..Teleporte.."",Tele) setTimer(event, 1000,1) alarme = true end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), Config_load ) --- // PAINEL PORTAO local m_portao = createMarker (portao[1], portao[2], portao[3]-1, "cylinder", 10, 0, 255, 255, 0) function painel_portao (source) login = getAccountName(getPlayerAccount(source)) if getElementData(source,"Tag_PainelBase") or isObjectInACLGroup("user."..login, aclGetGroup(Acesso_ADM)) then triggerEvent ("abrir", source) return end if getElementData(source,"Portao_senha") == 3 then outputChatBox ('[ ATENÇAO ] - Você foi bloqueado por 2 minutos, de tentar digitar a senha.', source, 255, 255, 255, true) return end triggerClientEvent (source, "Event_Painel_2", root) triggerEvent ("Password_2", source) end addEventHandler ("onMarkerHit", m_portao, painel_portao) function validar_senha() senha = Base triggerClientEvent (source, "Senha_Portao_2", root, senha) end addEvent ("Password_2", true) addEventHandler ("Password_2", getRootElement(), validar_senha) function Portao () gate = createObject (idportao, portao[1], portao[2], portao[3], portao[4], portao[5], portao[6]) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), Portao ) function abrir (source) setElementData(source,"Tag_PainelBase",true) moveObject(gate, 2000, portao[1], portao[2], portao[3]-10) setTimer ( function() moveObject(gate, 2000, portao[1], portao[2], portao[3]) end, 6000, 1 ) end addEvent ("abrir", true) addEventHandler ("abrir", getRootElement(), abrir) function abrir2 () setElementData(source,"Tag_PainelBase",true) end addEvent ("abrir2", true) addEventHandler ("abrir2", getRootElement(), abrir2) addEventHandler("onPlayerJoin",root, function() setElementData(source,"Portao_senha",0) end) addEventHandler("onResourceStart",resourceRoot, function() local players = getElementsByType ( "player" ) for i,p in ipairs(players) do setElementData(p,"Portao_senha",0) end end ) addEventHandler("onResourceStop",resourceRoot, function() local players = getElementsByType ( "player" ) for i,p in ipairs(players) do setElementData(p,"Portao_senha",0) end end ) timer = {} function erro_senha() if getElementData(source,"Portao_senha") == 3 then if timer[source] then outputChatBox ('[ ATENÇAO ] - Você foi bloqueado por 2 minutos, de tentar digitar a senha.', source, 255, 255, 255, true) triggerClientEvent (source, "Painel_exit", root) setElementPosition( source, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) setElementPosition( getPedOccupiedVehicle(source), TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) else timer[source] = setTimer (setElementData, 60000*2, 1, source, "Portao_senha", 0) outputChatBox ('[ ATENÇAO ] - Você foi bloqueado por 2 minutos, de tentar digitar a senha.', source, 255, 255, 255, true) triggerClientEvent (source, "Painel_exit", root) setElementPosition( source, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) setElementPosition( getPedOccupiedVehicle(source), TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) end return end if getElementData(source,"Portao_senha") == 2 then outputChatBox ('[ ATENÇAO ] - Senha incorreta, voce pode apenas 1 tentativa.', source, 255, 255, 255, true) end if getElementData(source,"Portao_senha") == 1 then outputChatBox ('[ ATENÇAO ] - Senha incorreta, voce pode apenas 2 tentativas.', source, 255, 255, 255, true) end if getElementData(source,"Portao_senha") == 0 then outputChatBox ('[ ATENÇAO ] - Senha incorreta, voce pode apenas 3 tentativas.', source, 255, 255, 255, true) end setElementData(source,"Portao_senha",getElementData(source,"Portao_senha")+1) end addEvent ("Erro_senha", true) addEventHandler ("Erro_senha", getRootElement(), erro_senha) --------------------- CRIA MARKER MOVE local descer = createMarker(1540.6694335938, -1609.2290039063, 21.2,"cylinder", 1, 0, 255, 255, 0) local subir = createMarker(1540.8563232422, -1609.2290039063, 12.6,"cylinder", 1, 0, 255, 255, 0) function desceu(source) fadeCamera(source, false) setTimer(fadeCamera, 1000, 1, source, true) setTimer ( function() setElementPosition (source, 1545.775390625, -1607.8100585938, 13.3828125) setElementRotation(source,0,0,218.36817932129) end, 1000, 1 ) end addEventHandler("onMarkerHit", descer, desceu) function subiu(source) fadeCamera(source, false) setTimer(fadeCamera, 1000, 1, source, true) setTimer ( function() setElementPosition (source, 1544.0809326172, -1609.0495605469, 22.155364990234) setElementRotation(source,0,0,229.6483001709) end, 1000, 1 ) end addEventHandler("onMarkerHit", subir, subiu) script: client local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 1024 local x, y = (screenW/resW), (screenH/resH) local xx, _ = (screenW/resW), (screenH/resH) -- /// ACL PARA RECRUTAR local ACL = "PMERJ" -- /// QUALQUER CORDENADA DENTRO DA BASE Sirene = {} Sirene = {1774.9443359375,-1936.95703125,12.667187690735} local painel = false local personagem = false local carros = false local armas = false local gerenciador = false local gerenciando = false local carro1 = false local carro2 = false local carro3 = false local tag = false local senha_branco = "" local senha_gerenciador = PMERJ667 fonte1 = dxCreateFont("gerenciador/gfx/fonte1.ttf", 15) fonte2 = dxCreateFont("gerenciador/gfx/fonte2.ttf", 10) fonte3 = dxCreateFont("gerenciador/gfx/fonte2.ttf", 13) addEventHandler("onClientResourceStart", resourceRoot, function() Geren_senha = guiCreateEdit(x*95, y*467, x*122, y*27, "", false) guiSetVisible(Geren_senha, false) guiEditSetMasked ( Geren_senha, true ) New_pass_gerenciador = guiCreateEdit(x*118, y*458+10, x*95, y*26, "", false) guiSetVisible(New_pass_gerenciador, false) change_pass_portao = guiCreateEdit(x*122, y*601+10, x*86, y*26, "", false) guiSetVisible(change_pass_portao, false) change_tele = guiCreateEdit(x*122, y*698+10, x*86, y*26, "", false) guiSetVisible(change_tele, false) change_tag = guiCreateEdit(x*237, y*602+10, x*176, y*28, "", false) guiEditSetMaxLength ( change_tag, 20 ) -- Limite maximo de letras da tag guiSetVisible(change_tag, false) procurar = guiCreateEdit(x*240, y*323, x*172, y*24, "", false) guiSetVisible(procurar, false) grdPlayers = guiCreateGridList(x*244, y*340+10, x*165, y*187, false) guiSetFont (grdPlayers, "default-bold-small" ) colPlayers = guiGridListAddColumn(grdPlayers, "Jogadore: ", 0.9) guiSetVisible ( grdPlayers, false ) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end end ) function alarme_conf (info) if info == "true" then alarme = true elseif info == "false" then alarme = false end end addEvent ("Alarme_Config", true) addEventHandler ("Alarme_Config", root, alarme_conf) function paineldx () if personagem == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 391, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 427, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 462, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 320, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 355, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("PERSONAGENS", 221, 320, 396, 351, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("Personagem 1", 221, 355, 396, 386, tocolor(255, 255, 255, 255), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("Personagem 2", 221, 391, 396, 422, tocolor(255, 255, 255, 255), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("Personagem 3", 221, 427, 396, 458, tocolor(255, 255, 255, 255), 1.00, fonte3, "center", "center", false, false, false, false, false) Retangulo(44, 497, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 534, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 569, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("VEICULOS", 221, 462, 396, 493, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("ARMAS", 221, 497, 396, 528, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("GERENCIADOR", 221, 534, 396, 565, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 569, 396, 600, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) elseif carros == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 319, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 354, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 529, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 566, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("PERSONAGENS", 221, 319, 396, 350, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("VEICULOS", 221, 354, 396, 385, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 566, 396, 597, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 494, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("GERENCIADOR", 221, 529, 396, 560, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 390, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 425, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 460, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("ARMAS", 221, 494, 396, 525, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) if carro1 == true then Texto_2("Destruir", 221, 390, 396, 421, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif carro1 == false then Texto_2("Veiculo 1", 221, 390, 396, 421, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) end if carro2 == true then Texto_2("Destruir", 221, 425, 396, 456, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif carro2 == false then Texto_2("Veiculo 2", 221, 425, 396, 456, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) end if carro3 == true then Texto_2("Destruir", 221, 460, 396, 491, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif carro3 == false then Texto_2("Veiculo 3", 221, 460, 396, 491, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) end elseif armas == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 319, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 390, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 529, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 566, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("PERSONAGENS", 221, 319, 396, 350, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 566, 396, 597, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 494, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("GERENCIADOR", 221, 529, 396, 560, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 354, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 425, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 460, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("ARMAS", 221, 390, 396, 421, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("Armas 1", 221, 425, 396, 456, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("Armas 2", 221, 460, 396, 491, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("VEICULOS", 221, 354, 396, 385, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("Armas 3", 221, 494, 396, 525, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif gerenciador == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 355, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 426, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 390, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 320, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 542, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("VEICULOS", 221, 355, 396, 386, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("ARMAS", 221, 390, 396, 421, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("GERENCIADOR", 221, 426, 396, 457, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 542, 396, 573, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("PERSONAGENS", 221, 320, 396, 351, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 461, 175, 76, tocolor(0, 0, 0, 221), false) Texto("SENHA:", 53-8, 456, 118-8, 484, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Retangulo(95, 504, 67, 20, tocolor(0, 37, 32, 255), false) Texto_2("Entrar", 272, 504, 339, 524, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) else Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 319, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 355, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 390, 175, 31, tocolor(0, 0, 0, 221), false) if gerenciando == false then Retangulo(44, 460, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("FECHAR", 221, 460, 396, 491, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) end Texto_2("PERSONAGENS", 221, 319, 396, 350, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("VEICULOS", 221, 355, 396, 386, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("ARMAS", 221, 390, 396, 421, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 425, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("GERENCIADOR", 221, 425, 396, 456, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) end if gerenciando == true then local info_tag = guiGetText(change_tag) Retangulo_2(44, 450, 175, 61, tocolor(0, 0, 0, 221), false) Texto("Nova \n senha:", 53, 456, 118, 484, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Retangulo_2(91, 489, 89, 18, tocolor(2, 63, 42, 255), false) Retangulo_2(44, 517, 175, 48, tocolor(0, 0, 0, 215), false) Texto("Alarme da base", 91, 521, 180, 538, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) if alarme == false then Retangulo_2(139, 542, 32, 19, tocolor(229, 0, 0, 215), false) else Retangulo_2(139, 542, 32, 19, tocolor(32, 31, 31, 240), false) end if alarme == true then Retangulo_2(97, 542, 32, 19, tocolor(5, 223, 5, 215), false) else Retangulo_2(97, 542, 32, 19, tocolor(32, 31, 31, 240), false) end Texto("OFF", 139, 542, 171, 561, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("ON", 97, 542, 129, 561, tocolor(255, 255, 255, 215), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(44, 571, 175, 98, tocolor(0, 0, 0, 221), false) Texto("Alterar senha portao", 92, 576, 181, 593, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("Nova \n senha:", 53, 599, 118, 627, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Texto("Alterar", 91, 489, 180, 506, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(92, 639, 89, 18, tocolor(2, 63, 42, 255), false) Retangulo_2(44, 674, 175, 98, tocolor(0, 0, 0, 221), false) Retangulo_2(88, 744, 89, 18, tocolor(2, 63, 42, 255), false) Texto("Alterar", 88, 744, 177, 761, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("Novo \n comando:", 54, 696, 119, 724, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Texto("Alterar teleporte", 92, 679, 181, 696, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(232, 285, 187, 280, tocolor(0, 0, 0, 215), false) Texto("Membros", 242, 295, 389, 313, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Texto("Alterar", 92, 639, 181, 656, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(279, 537, 89, 18, tocolor(2, 63, 42, 255), false) if aVisible then Texto("Dar Tag", 279, 538, 368, 555, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) end if rVisible then Texto("Remover Tag", 279, 538, 368, 555, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) else Texto("Dar Tag", 279, 538, 368, 555, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) end Retangulo_2(233, 571, 186, 137, tocolor(0, 0, 0, 221), false) Texto("Alterar tag", 279, 575, 368, 592, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("TAG: "..info_tag, 237, 636, 302, 664, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, true, false) Retangulo_2(279, 670, 89, 18, tocolor(2, 63, 42, 255), false) Texto("Alterar", 279, 671, 368, 688, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(233, 715, 186, 57, tocolor(0, 0, 0, 215), false) Texto("FECHAR", 233, 714, 419, 772, tocolor(229, 0, 0, 215), 1.00, fonte3, "center", "center", false, false, false, false, false) end end function Retangulo (a, b, c, d, t) dxDrawRectangle(x*a, y*b, x*c, y*d, t, false) end function Retangulo_2 (a, b, c, d, t) dxDrawRectangle(x*a, y*b+10, x*c, y*d, t, false) end function Texto (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) dxDrawText(a, x*b, y*c+10, x*d, y*e+10, f, x*g, h, i, j, k, l, m, n, o) end function Texto_2 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) local screenW,screenH = guiGetScreenSize() local resW, resH = 2900, 1024 local x, y = (screenW/resW), (screenH/resH) dxDrawText(a, x*b, y*c, x*d, y*e, f, xx*g, h, i, j, k, l, m, n, o) end function fechar (_,state) if painel == true then if state == "down" then if personagem == false and carros == false and gerenciador == false and gerenciando == false and armas == false then if isCursorOnElement(x*41, y*460, x*175, y*31) then personagem = false carros = false armas = false gerenciador = false gerenciando = false painel = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible ( grdPlayers, false ) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and personagem == true then if isCursorOnElement(x*44, y*569, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and carros == true then if isCursorOnElement(x*44, y*569, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and armas == true then if isCursorOnElement(x*44, y*569, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and gerenciador == true then if isCursorOnElement(x*44, y*542, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and gerenciando == true then if isCursorOnElement(x*233, y*715, x*186, y*57) then personagem = false carros = false armas = false painel = false gerenciador = false guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end end end end addEventHandler ("onClientClick", root, fechar) function obter_senha(pass) senha_gerenciador = pass end addEvent ("Senha_Portao", true) addEventHandler ("Senha_Portao", root, obter_senha) function gerenciar (_,state) if painel == true then if state == "down" then if gerenciador == true then if isCursorOnElement(x*90, y*504, x*67, y*20) then if getElementData(localPlayer,"AcessoPainel") then gerenciador = false guiSetVisible(Geren_senha, false) gerenciando = true guiSetVisible(New_pass_gerenciador, true) guiSetVisible(change_pass_portao, true) guiSetVisible(change_tele, true) guiSetVisible(change_tag, true) guiSetVisible(procurar, true) guiSetVisible ( grdPlayers, true ) else if guiGetText(Geren_senha) == senha_branco then return end if guiGetText(Geren_senha) == ""..senha_gerenciador.."" then gerenciador = false guiSetVisible(Geren_senha, false) gerenciando = true guiSetVisible(New_pass_gerenciador, true) guiSetVisible(change_pass_portao, true) guiSetVisible(change_tele, true) guiSetVisible(change_tag, true) guiSetVisible(procurar, true) guiSetVisible ( grdPlayers, true ) else outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: A senha '#00FF00"..guiGetText(Geren_senha).."#FFFFFF' digitada está incorreta.", 255, 255 ,255, true ) end end end end end end end addEventHandler ("onClientClick", root, gerenciar) function onClientGUIClick(button) local name = guiGridListGetItemText(grdPlayers, guiGridListGetSelectedItem(grdPlayers), 1) if name ~= "" then local player = getPlayerFromPartialName(name) if player then if getElementData(player,"Tag_PainelBase") then aVisible = false rVisible = true else aVisible = true rVisible = false end end end end addEventHandler("onClientGUIClick", resourceRoot,onClientGUIClick) function configuracoes (_,state) if painel == true then if state == "down" then if gerenciando == true then if isCursorOnElement(x*91, y*489+10, x*89, y*18) then local chgpass = guiGetText(New_pass_gerenciador) if guiGetText(New_pass_gerenciador) == senha_branco then return end triggerServerEvent("Change_pass",getLocalPlayer(), chgpass) guiSetText(New_pass_gerenciador, "") elseif isCursorOnElement (x*92, y*639+10, x*89, y*18) then if guiGetText(change_pass_portao) == senha_branco then return end local chgpass_portao = guiGetText(change_pass_portao) triggerServerEvent("Change_pass_portao",getLocalPlayer(), chgpass_portao) guiSetText(change_pass_portao, "") elseif isCursorOnElement (x*88, y*744+10, x*89, y*18) then if guiGetText(change_tele) == senha_branco then return end local telport = guiGetText(change_tele) triggerServerEvent("Trocar_teleport",getLocalPlayer(), telport) guiSetText(change_tele, "") elseif isCursorOnElement (x*279, y*537+10, x*89, y*18) then local row, col = guiGridListGetSelectedItem(grdPlayers) if row == -1 or col == -1 then return end local name = guiGridListGetItemText(grdPlayers, row, col) local target = getPlayerFromPartialName(name) if target then triggerServerEvent("MoverACL", getLocalPlayer(), target, ACL) end guiGridListClear(grdPlayers) --- LISTA JOGADORES for id, players in ipairs (getElementsByType("player")) do local row = guiGridListAddRow(grdPlayers) guiGridListSetItemText(grdPlayers, row, 1, getPlayerName(players):gsub('#%x%x%x%x%x%x', ''), false, false) end elseif isCursorOnElement (x*279, y*670+10, x*89, y*18) then if guiGetText(change_tag) == senha_branco then return end local tag = guiGetText(change_tag) triggerServerEvent("Trocar_tag",getLocalPlayer(), tag) elseif isCursorOnElement (x*97, y*542+10, x*32, y*19) then alarme = true triggerServerEvent("Alarme_on",getLocalPlayer()) elseif isCursorOnElement (x*139, y*542+10, x*32, y*19) then alarme = false triggerServerEvent("Alarme_off",getLocalPlayer()) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true gerenciando = false carro = false armas = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then carros = true armas = false guiSetVisible ( grdPlayers, false ) personagem = false gerenciador = false gerenciando = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) elseif isCursorOnElement (x*44, y*425, x*175, y*31) then carros = false armas = false personagem = false gerenciador = true guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, true) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) removeEventHandler("onClientClick", root, botoes_gerenciamento) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*390, x*175, y*31) then carros = false armas = true personagem = false gerenciador = false guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_gerenciamento) addEventHandler ("onClientClick", root, botoes_armas) end end end end end addEventHandler ("onClientClick", root, configuracoes) function botoes_jogador(_,state) if painel == true then if state == "down" then if personagem == true then if isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = false removeEventHandler("onClientClick", root, botoes_jogador) addEventHandler ("onClientClick", root, botoes_inicial) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then triggerServerEvent("Skin_Event_1",getLocalPlayer()) elseif isCursorOnElement (x*44, y*391, x*175, y*31) then triggerServerEvent("Skin_Event_2",getLocalPlayer()) elseif isCursorOnElement (x*44, y*427, x*175, y*31) then triggerServerEvent("Skin_Event_3",getLocalPlayer()) elseif isCursorOnElement (x*44, y*462, x*175, y*31) then carros = true armas = false personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*497, x*175, y*31) then carros = false armas = true personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*534, x*175, y*31) then carros = false armas = false personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = true removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) end end end end end function botoes_veiculos(_,state) if painel == true then if state == "down" then if carros == true then if isCursorOnElement (x*44, y*355, x*175, y*31) then carros = false removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*390, x*175, y*31) then if carro1 == false then carro1 = true triggerServerEvent("Veiculo_1",getLocalPlayer()) else triggerServerEvent("Veiculo_1_Destruir",getLocalPlayer()) carro1 = false end elseif isCursorOnElement (x*44, y*425, x*175, y*31) then if carro2 == false then carro2 = true triggerServerEvent("Veiculo_2",getLocalPlayer()) else triggerServerEvent("Veiculo_2_Destruir",getLocalPlayer()) carro2 = false end elseif isCursorOnElement (x*44, y*460, x*175, y*31) then if carro3 == false then carro3 = true triggerServerEvent("Veiculo_3",getLocalPlayer()) else triggerServerEvent("Veiculo_3_Destruir",getLocalPlayer()) carro3 = false end elseif isCursorOnElement (x*44, y*497, x*175, y*31) then carros = false armas = true personagem = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true carros = false armas = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*534, x*175, y*31) then carros = false armas = false personagem = false gerenciador = true guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) end end end end end function botoes_armas(_,state) if painel == true then if state == "down" then if armas == true then if isCursorOnElement (x*44, y*390, x*175, y*31) then armas = false removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*425, x*175, y*31) then triggerServerEvent("Armas_1",getLocalPlayer()) elseif isCursorOnElement (x*44, y*460, x*175, y*31) then triggerServerEvent("Armas_2",getLocalPlayer()) elseif isCursorOnElement (x*44, y*494, x*175, y*31) then triggerServerEvent("Armas_3",getLocalPlayer()) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true carro = false armas = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_gerenciamento) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then carros = true armas = false personagem = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*534, x*175, y*31) then carros = false armas = false personagem = false gerenciador = true guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) end end end end end function botoes_gerenciamento(_,state) if painel == true then if state == "down" then if gerenciador == true then if isCursorOnElement (x*44, y*425, x*175, y*31) then gerenciador = false guiSetVisible(Geren_senha, false) removeEventHandler("onClientClick", root, botoes_gerenciamento) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*390, x*175, y*31) then carros = false armas = true guiSetVisible ( grdPlayers, false ) personagem = false gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_gerenciamento) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true carro = false armas = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then carros = true armas = false personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) end end end end end function botoes_inicial(_,state) if painel == true then if state == "down" then if isCursorOnElement (x*44, y*319, x*175, y*31) then if personagem == false then personagem = true addEventHandler ("onClientClick", root, botoes_jogador) carros = false armas = false gerenciando = false gerenciador = false guiSetVisible ( grdPlayers, false ) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else personagem = false end elseif isCursorOnElement (x*44, y*355, x*175, y*31) then if carros == false then carros = true personagem = false gerenciador = false armas = false guiSetVisible ( grdPlayers, false ) gerenciando = false addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else carros = false end elseif isCursorOnElement (x*44, y*390, x*175, y*31) then if armas == false then personagem = false carros = false armas = true gerenciador = false guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, false) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else armas = false end elseif isCursorOnElement (x*44, y*425, x*175, y*31) then if gerenciador == false then personagem = false carros = false armas = false gerenciador = true guiSetVisible ( grdPlayers, false ) gerenciando = false addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else gerenciador = false guiSetVisible(Geren_senha, false) end end end end end function Alarme() if alarme == true then if isElement( sound ) then stopSound( sound ) end sound = playSound3D( 'gerenciador/gfx/alarme.mp3', Sirene[1], Sirene[2], Sirene[3], false) setSoundMaxDistance( sound, 250 ) end end addEvent ("Alarme_Painel", true) addEventHandler ("Alarme_Painel", root, Alarme) function Alarme_off() if isElement( sound ) then stopSound( sound ) end end addEvent ("Alarme_Painel_OFF", true) addEventHandler ("Alarme_Painel_OFF", root, Alarme_off) function addPlayerToList(ply) local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(ply) guiGridListSetItemText(grdPlayers,row, colPlayers, name:gsub('#%x%x%x%x%x%x', ''), false, false) guiGridListSetItemColor(grdPlayers, row, colPlayers, 255,255,255 ) end function onClientGUIChanged() if source == procurar then guiGridListClear(grdPlayers) for i, v in ipairs(getElementsByType("player")) do if string.find(string.lower(getPlayerName(v):gsub('#%x%x%x%x%x%x', '')), string.lower(guiGetText(source))) then local row = guiGridListAddRow(grdPlayers) guiGridListSetItemText(grdPlayers, row, colPlayers, getPlayerName(v):gsub('#%x%x%x%x%x%x', ''), false, false) guiGridListSetItemColor (grdPlayers, row, colPlayers, 255,255,255 ) end end end end addEventHandler("onClientGUIChanged", root,onClientGUIChanged) event_player_join = function() addPlayerToList(source) end addEventHandler("onClientPlayerJoin", getRootElement(), event_player_join) function removePlayerFromList(ply) local name=getPlayerName(ply) for row=0,guiGridListGetRowCount(grdPlayers) do if guiGridListGetItemText(grdPlayers, row, colPlayers) == name then guiGridListRemoveRow(grdPlayers, row) end end end addEventHandler("onClientPlayerQuit", getRootElement(), removePlayerFromList) function atualizarlista() guiGridListClear(grdPlayers) for id, players in ipairs (getElementsByType("player")) do local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(players) guiGridListSetItemText(grdPlayers,row, colPlayers, name:gsub('#%x%x%x%x%x%x', ''), false, false) guiGridListSetItemColor ( grdPlayers, row, colPlayers, 255,255,255 ) end end addEventHandler("onClientPlayerChangeNick", getRootElement(), atualizarlista) function Painel_open () if painel == false then addEventHandler ("onClientRender", root, paineldx) addEventHandler ("onClientClick", root, botoes_inicial) guiSetInputMode("no_binds_when_editing") showCursor (true) painel = true end end addEvent ("Event_Painel", true) addEventHandler ("Event_Painel", root, Painel_open) 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 --- // PAINEL PORTAO local painel_p = false local senha = Cps69 addEventHandler("onClientResourceStart", resourceRoot, function() password = guiCreateEdit(x*362, y*369, x*171, y*29, "", false) guiEditSetMasked ( password, true ) guiSetVisible(password, false) end ) function paineldx_portao() local px,py,pz= interpolateBetween(0, 0, 0, 255, 185, 1, ((getTickCount() - bot) / 2000), "Linear") local tentativas = getElementData(localPlayer,"Portao_senha") guiSetAlpha(password, pz) dxDrawRectangle(x*328, y*266, x*245, y*204, tocolor(0, 0, 0, py), false) dxDrawRectangle(x*328, y*266, x*245, y*37, tocolor(255, 255, 255, px), false) dxDrawText("Digite a senha do portão", x*327, y*266, x*535, y*303, tocolor(0, 0, 0, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) if isCursorOnElement(x*383, y*415, x*128, y*31) then dxDrawRectangle(x*383, y*415, x*128, y*31, tocolor(0, 0, 0, px), false) dxDrawText("Abrir", x*383, y*415, x*511, y*446, tocolor(255, 255, 255, px), 1.00, "default-bold", "center", "center", false, false, false, false, false) else dxDrawRectangle(x*383, y*415, x*128, y*31, tocolor(255, 255, 255, px), false) dxDrawText("Abrir", x*383, y*415, x*511, y*446, tocolor(0, 0, 0, px), 1.00, "default-bold", "center", "center", false, false, false, false, false) end dxDrawText("Digite a senha no quadrado abaixo", x*328, y*313, x*573, y*331, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) if tentativas == 0 then dxDrawText("Tentavivas: 3 restantes.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) elseif tentativas == 1 then dxDrawText("Tentavivas: 2 restantes.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) elseif tentativas == 2 then dxDrawText("Tentavivas: 1 restantes.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) elseif tentativas == 3 then dxDrawText("Tentavivas: Ultima tentaiva.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) end if isCursorOnElement(x*535, y*266, x*38, y*37) then dxDrawRectangle(x*535, y*266, x*38, y*37, tocolor(255, 255, 255, px), false) dxDrawText("X", x*535, y*266, x*573, y*303, tocolor(0, 0, 0, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) else dxDrawRectangle(x*535, y*266, x*38, y*37, tocolor(0, 0, 0, px), false) dxDrawText("X", x*535, y*266, x*573, y*303, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) end end function abrirpainel () if painel_p == false then addEventHandler ("onClientRender", root, paineldx_portao) guiSetInputMode("no_binds_when_editing") showCursor (true) painel_p = true guiSetVisible(password, true) bot = getTickCount() end end addEvent ("Event_Painel_2", true) addEventHandler ("Event_Painel_2", root, abrirpainel) function exitpainel () removeEventHandler ("onClientRender", root, paineldx_portao) showCursor (false) painel_p = false guiSetVisible(password, false) end addEvent ("Painel_exit", true) addEventHandler ("Painel_exit", root, exitpainel) function fecharpainel (_,state) if painel_p == true then if state == "down" then if isCursorOnElement (x*535, y*266, x*38, y*37) then removeEventHandler ("onClientRender", root, paineldx_portao) showCursor (false) painel_p = false guiSetVisible(password, false) end end end end addEventHandler ("onClientClick", root, fecharpainel) function obter_senha_2(pass) senha = pass end addEvent ("Senha_Portao_2", true) addEventHandler ("Senha_Portao_2", root, obter_senha_2) function abrir (_,state) if painel_p == true then if state == "down" then if isCursorOnElement(x*383, y*415, x*128, y*31) then if guiGetText(password) == ""..senha.."" then triggerServerEvent ("abrir", localPlayer) triggerServerEvent ("abrir2", localPlayer) removeEventHandler ("onClientRender", root, paineldx_portao) showCursor (false) painel_p = false guiSetVisible(password, false) else triggerServerEvent ("Erro_senha", localPlayer) end end end end end addEventHandler ("onClientClick", root, abrir) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end
  18. Olá pessoal, estou tentando procurar um mod que dê para armazenar armas nas bases, pois no server as unicas pessoas que tem acesso as armas sao as gangs, ela vao numa fabrica e pagam por exemplo 2k por uma ak47 e ficam craftando ela durante 3 minutos. Somente membros de gang podem craftar essas armas, a unica maneira que os civis tem de comprar armas é os membros das gangs venderem-lhes. Para nao ficar chato para os membros da gang cada vez que quiserem vender uma arma terem que ir craftar e depois entregar na pessoa e ter que voltar e craftar outra pessoa pensei em um mod que desse para armazenar as armas dentro da base, tem algum mod assim ou parecido? eu estudei um pouco de programaçao so que nao sei como funciona os scripts ou la o que é aqui no mta, podiam me ajudar por favor? edit1:tags
  19. Opa pessoal, sou novo na criação de servidores e tava procurando criar um servidor de roleplay, tava indo tudo bem ... os mods e tudo direitinho, só quando eu fecho o servidor, ou reinicio pelo host tudo alguns, os IDs redefinem, os niveis, o dinheiro e tudo. isso não sei se é porque ele deixou o servidor on-line, ou os mods se juntaram ao servidor, ou algum mod que deixa essas coisas, me ajuda nisso ai por favor!
  20. --meu sistema de level local recompensa = 100 -- quantidade= function experience () for i, p in ipairs( getElementsByType( "player" ) ) do local exp = getElementData(p, "Exp") local exps = tonumber(getElementData(p, "Exp")) local lvls = tonumber(getElementData(p, "Level")) if lvls and exps then local needexp = lvls * 1500 if not exp then setElementData(p, "Level", 0) setElementData(p, "Exp", 0) else if exps >= needexp then setElementData(p, "Level", lvls + 1) setElementData(p, "Exp", 0) givePlayerMoney(p, recompensa) outputChatBox ("#106FE7( #ffffffLEVEL#106FE7 ) #FFFFFF Parabéns você passou para o level #106FE7" .. lvls + 1 .. "", p, 255, 255, 255, true) end end end end end setTimer(experience, 100, 0) function killandexp (ammo, killer, killerweapon, bodypart) if (killer) and (killer ~= source) then local exp = getElementData(killer, "Exp") local exps = tonumber(getElementData(killer, "Exp")) if not exp then setElementData(killer, "Exp", 0) else setElementData(killer, "Exp", exps + 2) triggerClientEvent(killer,"xplevel",killer) end end end addEventHandler ( "onPlayerWasted", getRootElement(), killandexp) function ChuvaXP (player) if (hasObjectPermissionTo(player, "command.kick", false)) then for id, players in ipairs(getElementsByType("player")) do local exp = getElementData(players, "Exp") local exps = tonumber(getElementData(players, "Exp")) if not exp then setElementData(players, "Exp", 0) else setElementData(players, "Exp", exps + 100) triggerClientEvent(players,"xplevel",players) end end end end addCommandHandler("chuvaxp", ChuvaXP) function ChuvaXPO (player) if (hasObjectPermissionTo(player, "general.tab_bans", false)) then outputChatBox ("#106FE7(#ffffffCHUVA XP#106FE7) ➺ #ffffff".. getPlayerName(player) .." #FFFFFFDeu #106FE7(#FFFFFFXP: #106FE7100 #106FE7) #FFFFFFPara Todos", root, 255, 255, 255, true) end end addCommandHandler("chuvaxp", ChuvaXPO) addEventHandler("onPlayerLogin", root, function(p, c) local lvl = getAccountData(c, "lvl") local exp = getAccountData(c, "exp") if lvl and exp then setElementData(source, "Level", lvl) setElementData(source, "Exp", exp) else setElementData(source, "Level", 0) setElementData(source, "Exp", 0) setAccountData(c, "exp", 0) setAccountData(c, "lvl", 0) end end) addEventHandler("onPlayerQuit", root, function() local acc = getPlayerAccount(source) if acc and not isGuestAccount(acc) then local lvl = getElementData(source, "Level") or 0 local exp = getElementData(source, "Exp") if lvl and exp then setAccountData(acc, "exp", exp) setAccountData(acc, "lvl", lvl) else setAccountData(acc, "exp", 0) setAccountData(acc, "lvl", 0) end end end) addCommandHandler("setlevel", function(player, cmd, target, amount) local accName = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup ("user."..accName, aclGetGroup("CDD|superMOD")) then outputChatBox("Você não tem acesso a esta equipe!", player, 255, 0, 0) return end if target then if tonumber(amount) then local targetplayer = getPlayerFromName(target) if targetplayer then setElementData(targetplayer, "Level", amount) setElementData(targetplayer, "Exp", 0) outputChatBox("Você instalou com sucesso "..amount.." nível do jogador "..getPlayerName(targetplayer).."!", player, 0, 255, 0, true) else outputChatBox("Erro: jogador não encontrado", player, 255, 0, 0) end else outputChatBox("Use: / setlevel [Nickname] [Level]", player, 255, 0, 0) end else outputChatBox("Use: / setlevel [Nickname] [Level]", player, 255, 0, 0) end end) --trabalho que quero que quando o player finalize receba exp MarkerSafeEntregadorDeJornal = createMarker( 1280.835, -1541.986, 13.522, "cylinder", 35, 0, 255, 0, 0) EntregadorDeJornalPickup = createPickup ( 1280.835, -1541.986, 13.522, 3, 1210) MarkerEntregadorDeJornal = createMarker ( 1280.835, -1541.986, 13.522, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MarkerEntregadorDeJornal, EntregadorDeJornalPickup, 0, 0, -1 ) BlipEntregadorDeJornal = createBlipAttachedTo ( MarkerEntregadorDeJornal, 42 ) setBlipVisibleDistance ( BlipEntregadorDeJornal, 150 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", EntregadorDeJornalPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "hq" cmd2 = "profissao" local HQEntregadorDeJornalBlip = createBlip ( 1280.835, -1541.986, 13.522 ) setElementVisibleTo ( HQEntregadorDeJornalBlip, root, false ) -------------------------------------------------------------------- function VerificarBlipEmprego(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end setElementVisibleTo ( HQEntregadorDeJornalBlip, player, false ) end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then return end VerificarBlipEmprego(pl) end end end, 3000,0) -------------------------------------------------------------------- function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Desmarcado do Mapa!", "info") else setElementVisibleTo ( HQEntregadorDeJornalBlip, source, true ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Marcado no Mapa!", "info") end end end addCommandHandler ( cmd1, ComandoHQ ) -------------------------------------------------------------------- function AceitarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) if getElementData ( source, "AirNew>Encaminhamento" ) == "Entregador de Jornal" then setElementData ( source, "AirNew>Encaminhamento", false ) setElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Entregador de Jornal, Para Mais Informações Digite ( /Profissao )", "success") else exports.Scripts_Dxmessages:outputDx(source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end function RecusarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) end removeElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Entregador de Jornal com Sucesso!", "warning") end -------------------------------------------------------------------- function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Entregador de Jornal" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09AComandos da Profissão de Entregador de Jornal", 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/Rotas #ffffff- #9ABDE0Abre a Lista de Rotas Disponiveis Para Trabalhar", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #FFD700Entre na Bike e Digite /Rotas Selecione uma Rota e Siga os Checkpoints!", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) end end addCommandHandler(cmd2, ComandosProf ) -------------------------------------------------------------------- function emarker(marker,md) if (md) then if isPedInVehicle ( source ) then return end if marker == MarkerEntregadorDeJornal then if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == MarkerEntregadorDeJornal then exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker) function CriarVeiculosComData () VeiculosComDataEntregadorDeJornal = { createVehicle(510, 1271.167, -1527.32, 13.564, 0, 0, 270 ), createVehicle(510, 1271.146, -1529.044, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -2, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -4, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -6, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -8, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -10, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -12, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -14, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -16, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -18, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -20, 13.564, 0, 0, 270 ), } for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do setElementData ( veh, "Emprego", "Entregador de Jornal" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 0, 0, 0 ) setVehiclePlateText ( veh, "RPGAMING" ) addEventHandler("onVehicleStartEnter", veh, VerificarEmprego ) --addEventHandler("onVehicleExit", veh, SairDoVeiculosComData ) local tx, ty, tz = getElementPosition(veh) local rx, ry, rz = getElementRotation(veh) setVehicleRespawnPosition(veh, tx, ty, tz, rx, ry, rz) end end addEventHandler("onResourceStart", resourceRoot, CriarVeiculosComData ) function VerificarEmprego (thePlayer, seat) local Jogador = getElementData(thePlayer, "Emprego" ) if seat == 0 then if Jogador == "Entregador de Jornal" then else cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Entregadores de Jornal!", "error") end end end --[[function SairDoVeiculosComData () local veh = source setTimer(function() if getVehicleOccupant(veh) == false then respawnVehicle(veh) end end, 30000, 1) end addEventHandler ( "onPlayerQuit", getRootElement(), SairDoVeiculosComData ) --]] -------------------------------------------------------------------- local rElement = getRootElement() function respawnVehicles(player, seconds) for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do if isEmpty( veh ) then respawnVehicle ( veh ) end end end setTimer(respawnVehicles, 60000,0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end -------------------------------------------------------------------- atualrotnumberJORNAL = {} ppcikJORNAL = {} blips = {} rotasJORNAL = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = { {1282.185, -1546.146, 13.547}, {1292.531, -1536.74, 13.491}, --{1117.78308, -1030.55933, 31.88287}, --{11270.73914, -1027.27011, 32.35918}, --{1466.25684, -1172.65686, 23.88302}, --{1673.56787, -1169.50952, 23.92861}, --{1791.41406, -1164.77539, 23.82813}, --{2095.31763, -1292.43701, 23.97214}, --{2150.26270, -1291.66003, 23.97753}, --{2352.627019, -1513.26306, 24.00000}, --{2561.87158, -1467.34753, 24.01236}, --{2756.12573, -1180.33130, 69.39844}, --{2863.57446, -1440.18982, 10.95315}, --{2507.24414, -1725.65881, 13.54688}, --{23270.33276, -1721.86511, 13.58705}, --{2228.38867, -1722.77356, 13.55438}, --{2175, -1742, 13.55438}, --{2072.61230, -1793.96008, 13.54688}, --{1871.15784, -1923.91858, 13.54688}, --{1352.39136, -1758.33508, 13.50781}, }, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = { {823.93018, -1413.86011, 13.46503}, {2709.32098, -1504.01135, 13.54223}, {797.72333, -1580.373270, 13.54688}, {645.75140, -1694.06555, 14.89330}, {422.36475, -1758.63403, 8.18526}, {305.55188, -1771.70020, 4.54249}, {168.62589, -1770.10681, 4.43438}, {138.38370, -1460.07129, 25.62103}, {169.82892, -1348.34363, 69.36220}, {280.87973, -1320.37817, 53.81308}, {543.01135, -1202.30334, 44.50127}, {562.19452, -1060.57458, 74.59800}, {782.98035, -808.70764, 65.19865}, {2708.08984, -684.05566, 116.23006}, {1091.30396, -627.89929, 111.38203}, {1280.77197, -614.80652, 102.93521}, {1437.30725, -935.30865, 36.26117}, {1335.64368, -1066.11133, 27.87136}, {1144.98792, -1131.54431, 23.82813}, {1022.52026, -1122.13037, 23.87152}, }, ["Entregas de Jornais - Los Santos (3) - 20 Entregas - $1500"] = { {1324.671, -1433.923, 14.969}, {1184.128, -1316.365, 13.573}, {1096.775, -1288.524, 13.554}, {994.57, -1298.388, 13.39}, {814.181, -1342.959, 13.533}, {792.273, -1626.558, 13.391}, {1077.013, -1859.017, 13.547}, {1408.296, -1881.205, 13.547}, {1830.151, -1841.683, 13.578}, {1924.561, -1789.748, 13.383}, {2096.031, -1806.206, 13.552}, {2289.097, -1724.15, 13.547}, {2268.405, -1667.375, 15.377}, {2011.597, -1597.769, 13.572}, {1911.033, -1604.44, 13.547}, {1864.723, -1604.331, 13.539}, {1671.314, -1583.68, 13.547}, {1581.473, -1448.472, 13.539}, {1519.231, -1449.773, 13.539}, {1363.771, -1431.401, 13.539}, }, } pay = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = 670, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = 750, ["Entregas de Jornais - Los Santos (3) - 20 Entregas - $1500"] = 1500, } function ifPlayerEnterOnMarker(markerHit,matchingDimension) if isPedInVehicle(source) then if markerHit == ppcikJORNAL[source] then if (matchingDimension) then if isElement(ppcikJORNAL[source]) then local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end destroyElement(ppcikJORNAL[source]) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, false ) setControlState ( source, "handbrake", true ) if atualrotnumberJORNAL[source] <= #rotasJORNAL[rname] then exports.Scripts_Dxmessages:outputDx(source, "Entregando Jornais... Aguarde 2 Segundos!", "info") setTimer(gerarrota,2500,1,source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Jornais Entregues, Siga Para o Proximo Checkpoint!", "success") end,2500,1,source) elseif atualrotnumberJORNAL[source] == #rotasJORNAL[rname]+1 then setElementData(source,"rtnameJornal",rname) atualrotnumberJORNAL[source] = 1 local rec = pay[rname] givePlayerMoney(source,tonumber(rec)) local vh = getPedOccupiedVehicle(source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Você Recebeu um Valor de $"..rec.." Por Finalizar as Entregas de Jornais!", "success") end,2500,1,source) setTimer(function(source) toggleAllControls ( source, true ) end, 2500,1, source ) setTimer(function(source) setControlState ( source, "handbrake", false ) end, 2500,1, source ) setElementData(source,"rtnameJornal",nil) local exp = getElementData(player, "Exp") local exps = tonumber(getElementData(player, "Exp")) --setElementData(player, "Exp", 0) setElementData(player, "Exp", exps + 100) triggerClientEvent(player,"xplevel",player) end end end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),ifPlayerEnterOnMarker) -------------------------------------------------------------------- function VerificarCairBike(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end local rname = getElementData(player,"rtnameJornal") or nil if rname == nil then triggerClientEvent ( "Desligar:AntiQueda", player ) else triggerClientEvent ( "Ligar:AntiQueda", player ) end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then VerificarCairBike(pl) end end end end, 3000,0) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function pickjobJornal(source) if not isElement(source) then return end local im = isPedInVehicle(source) if im == false then return end local job = getElementData(source,"Emprego") or false if job == "Entregador de Jornal" then local vh = getPedOccupiedVehicle(source) if isElement(vh) then local x,y = getElementPosition(vh) local x1,y1 = getElementPosition(source) local dist = getDistanceBetweenPoints2D(x,y,x1,y1) local isMarkerSafe = isElementWithinMarker(vh,MarkerSafeEntregadorDeJornal) local id = getElementModel(vh) local seat = getPedOccupiedVehicleSeat(source) if dist > 0 then return end if id == 510 then if seat == 0 then if isMarkerSafe == false then return end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>AbrirPainel<Client",source,rotasJORNAL) end end end end end addCommandHandler("rotas",pickjobJornal) function receivert(source,rotaname) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) setElementData(source,"rtnameJornal",rotaname) atualrotnumberJORNAL[source] = 1 gerarrota(source) end addEvent("AirNew>request>Startrota>Server>EntregadorDeJornal", true) addEventHandler("AirNew>request>Startrota>Server>EntregadorDeJornal",getRootElement(), receivert) function gerarrota(source) local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end if not isElement(ppcikJORNAL[source]) and isPedInVehicle(source) then local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, true ) setControlState ( source, "handbrake", false ) local id = tonumber(atualrotnumberJORNAL[source]) local x,y,z = rotasJORNAL[rname][id][1],rotasJORNAL[rname][id][2],rotasJORNAL[rname][id][3] ppcikJORNAL[source] = createMarker (x, y,z, "checkpoint", 4, 255, 0, 0, 50,source) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,true,x,y,z) atualrotnumberJORNAL[source] = id+1 end end function sair ( quitType ) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end end addEventHandler ( "onPlayerQuit", getRootElement(), sair ) function SairDaBike ( thePlayer, seat, jacked ) local rname = getElementData(thePlayer,"rtnameJornal") or nil if rname == nil then return end canceljobtimer (thePlayer) exports.Scripts_Dxmessages:outputDx(thePlayer, "Você Saiu da Bike, Entregas Canceladas!", "warning") end addEventHandler ( "onVehicleExit", getRootElement(), SairDaBike ) function canceljobtimer(source) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) atualrotnumberJORNAL[source] = 1 setElementData(source,"rtnameJornal",nil) end function canceljobdeath() local job = getElementData(source,"Emprego") or false if job ~= "Entregador de Jornal" then return end local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end canceljobtimer(source) exports.Scripts_Dxmessages:outputDx(source, "Você Morreu e Suas Entregas Foram Canceladas!", "warning") end addEventHandler( "onPlayerWasted", getRootElement( ),canceljobdeath)
  21. O trabalho é ajudante de pedreiro, consiste em pegar o emprego, ir ao prédio em construção, pegar uma viga de ferro e entregar ao pedreiro e ganhar dinheiro. queria por uma barra de progresso ao entregar para o pedreiro sx local, sy = guiGetScreenSize () local storagePed2 = createPed (2, 827.73742675781, -1750.5489501953, 23.046875) setElementData (storagePed2, 'ped-> jobNPC', 2) setElementFrozen (storagePed2, true) setPedRotation (storagePed2, 0) setElementData (storagePed2, "visibleName", "Cleyton") setElementData (storagePed2, "nameEnabled", true, false) setElementData (storagePed2, "tagName", "Pedreiro") objList local = { {839.5947265625, -1730.1517333984, 14.0-0.70, 0, 0, 45}, } função createObj () para k, em ipairs (objList) do obj = createObject (2960, i [1], i [2], i [3] - 0,67, i [4], i [5], i [6]) marcador = createMarker (i [1], i [2], i [3] -1, "cilindro", 1, 65, 105, 225, 70) fim fim addEventHandler ('onClientResourceStart', getRootElement () , createObj) função startJob (botão, estado, xx, aa, xxx, aaa, zzz, clickedElement) se o botão == "esquerdo" e o estado == "inativo" e o local x, y, z = getElementPosition (localPlayer) local ex, ey , ez = getElementPosition (storagePed2) se getDistanceBetweenPoints3D (x, y, z, ex, ey, ez) <= 2 e clicar em Element e getElementModel (clickedElement) == 2 e getElementData (clickedElement, "ped-> jobNPC") == 2 então, se getElementData (localPlayer, "job-> haveObject") == true, então triggerServerEvent ('dinheiro', localPlayer) setElementData (localPlayer, "job-> haveObject", false) setPedAnimation (localPlayer, "bombardeiro", "bom_plant_crouch_out") setObjectScale (planta1,0.7) setTimer (destroyElement, 16000, 1, planta1) destroyElement (blip1) setTimer (função () setPedAnimation (localPlayer, false) toggleControl ('sprint', toggleControl ('run', true) toggleControl ('jump', true) toggleControl ('fogo', true) toggleControl ('andar ', é verdade) end, 700, 1) dobozLead () else outputChatBox ("# 4169E1 [Brasil PH]: # ffffff Você não pegou uma viga", 255.255.255, true) end end end if clickedElement e getElementModel (clickedElement) == 2960 local x, y, z = getElementPosition (localPlayer) local ex, ey, ez = getElementPosition (obj), se getElementData (localPlayer, "PH-> Emprego-> Empregado") == " Estocador "ou getElementData (localPlayer," char.factionID ") == 999 então getDistanceBetweenPoints3D (x, y, z, ex, ey, ez) <= 2 then --if (getElementData (localPlayer, 'job-> haveObject') ) == false) e (getElementData (localPlayer, 'caractere> inActiveJob') == false) e setPedAnimation (localPlayer, 'bomber', 'bom_plant_crouch_in') setElementData (localPlayer, 'caractere> inActiveJob', true) obj = clicadoElement setTimer (função () setPedAnimation (localPlayer, false) setElementData (localPlayer, 'trabalho-> haveObject', true) setElementData (localPlayer, 'caracter-> inActiveJob' , false) outputChatBox ("# 4169E1 [Brasil PH]: #ffffffEntregue a viga ao pedreiro!", 255, 255, 255, true) triggerServerEvent ('neFuss',localPlayer) local poziciod = Vector3 (getElementPosition (localPlayer)) dobozKezbe = createObject (2960, poziciod.x, poziciod.y, poziciod.z) exporta.bone_attach : attachElementToBone (dobozKezbe, localPlayer, 12, 0,17, 0,25, 0,18, -99, 0, -20) setObjectScale (dobozKezbe) setPedAnimation (localPlayer, "CARRY", "crry_prtial", 4.1, verdadeiro, verdadeiro, verdadeiro) attachElements (dobozKezbe, localPlayer, 0, 0.5, 0) setElementCollisionsEnabled (dobozKezbe, false) end, 700,1) - else --outputChatBox ("Você já pegou a viga", 255.255.255, verdade) - end else outputChatBox ("# 4169E1 [Brasil PH]: # ffffff Você está muito longe", 255,255,255, true) end else outputChatBox ("# 4169E1 [Brasil PH]: #ffffffPegue o emprego na administração", 255,255,255, true) end end fim fim fim addEventHandler ("onClientClick", getRootElement (), startJob) função dobozLead () destroyElement (dobozKezbe) end addEvent ("doboz", true) addEventHandler ("doboz", root, dobozLead) Função Caixa de entrada (dx, dy, Dsz, MS, eX, EY) se (eX> = dX e eX <= dX + Dsz e Ey> = dY e EY <= dY + DM), em Seguida, retorne verdadeiro senão falsa retorne fim fim função isCursorInRectangle (x, y, w, h) é isCursorShowing () e local mx, my = getCursorPosition () local cursorx, cursory = mx * sx, meu * sy se cursorx> xe cursorx <x + nós superficial> ye superficial < y + h, em seguida, retorne true senão retorne false end end end
  22. quando eu vou criar um banco de dados no phpmyadmin ele da esse erro ja fiz de tudo nao consegui arrumar
  23. tipo tenho um server de rp mais o gamemode "play" nao server para isso entao quando eu desligo ele e o freeroam a tela fica preta quando vai entra no server. ai eu tenho que fica startando e dando stop sempre!! meu ajudam isso e urgente
  24. Eu gostaria de saber quando a pessoa tivesse em download a tela dela ficasse toda preta. E também o radar sumir quando n tiver dentro de um carro.
  25. Bom dia / Boa tarde / Boa noite. Por este tópico venho pedir ajuda de vocês. Sou noob em script. Minha Ideia: Estou criando um servidor, nesse servidor estou na fase de criar os mecânicos. Tenho todos os script (feito por mim) em questão de reparo mapas etc. Só falta um: o de transporte. Minha Ideia é quando o mecânico (com a tag de Mecânico), detectar o último carro que o mecânico entrou (no caso o do player que pediu o reparo) e assim ele coloca o carro em cima do guincho (o mais próximo). E que este carro fique fixado lá. Depois um comando de retirar o veículo da "rampa" do guincho. Dúvidas: Quais funções posso usar? Eu sei que o script é bem avançado, mas não precisa ser muito completo o importe é que funcione. Desde já agradeço a atenção de todos, obrigado :3
×
×
  • Create New...