Cannabis

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cannabis

  • Rank
    I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.
  1. Este erro dá quando eu tento dar uma TAG ou REMOVER UMA TAG com o painel de Gerenciador de Bases, preciso disso se alguém souber e puder me ajudar n entendo muito Este erro dá quando eu tento dar uma TAG ou REMOVER UMA TAG com o painel de Gerenciador de Bases --===========================================-- -- ________ ___ _ __ __ ____ -- -- / ____/ / / || | / // // __ \ -- -- / /_ / / / /| || | / // // / / / -- -- / __/ / /_ / ___ || |/ // // /_/ / -- -- /_/ /_ _ /_/ |_/|___//_/ \____/ -- --===========================================-- carro1 = {} carro2 = {} carro3 = {} local Protecao = "CONSOLE" -- ACL da protecao, se o player nao tiver nela, o alarme joga ele pra fora da base local Acesso_CONSOLE = "CONSOLE" --- Acesso a base e gerenciador sem precisar colocar a senha local id_skin1, id_skin2, id_skin3 = 14, 15, 16 -- 3 skins local id_carro1, id_carro2, id_carro3 = 596, 543, 402 -- 3 carros local carro_1, carro_2, carro_3 = true, true, true --- true = sim , false = nao local skin_1, skin_2, skin_3 = true, true, true local alarme = true --- /// PROTECAO BASE RestricLocation = {} TeleportLocation = {} RestricLocation["location1"] = {2182.427734375,-1762.2978515625,13.375} -- Local 1 RestricLocation["location2"] = {2185.2658691406,-1762.4279785156,13.378640174866} -- Local 2 TeleportLocation = {2188.740234375,-1762.4580078125,13.378610610962} MsgInvasao = "#00FF00[BCR GERENCIADOR]ʙᴀsᴇ ᴘʀɪᴠᴀᴅᴀ! ᴠᴏᴄᴇ ɴᴀᴏ ᴘᴏᴅᴇ ᴇɴᴛʀᴀʀ ᴀǫᴜɪ" --- /// PORTAO BASE local idportao = 980 portao = {1313.7047119141,-1238.9581298828,13.546875, -0, 0, 273.84588623047} --- /// TELEPORTE POR COMANDO DO GERENCIADOR Teleporte_BASE = {} Teleporte_BASE = {} --- Teleporte pelo comando do gerenciador local marker = createMarker (1286.0645751953,-1249.9592285156,13.546875, "cylinder", 1, 1, 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_BASE))then setElementData(source,"AcessoPainel",true) end end addEventHandler("onPlayerLogin",root,onPlayerLogin) --- /// VEICULOS function Veiculo_1 () if carro_1 == false then outputChatBox ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Não é permitido esse veíulo.",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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Você pegou o veículo 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Não é permitido este veículo.",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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Você pego o veículo 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin1) outputChatBox("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin2) outputChatBox("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin3) outputChatBox("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Você pego a tazer.",source,255,255,255,true) end addEvent ("Armas_1", true) addEventHandler ("Armas_1", root, Armas_1) function Armas_2 () giveWeapon(source, 14, 500 ) outputChatBox("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Você pego a Tear Gás.",source,255,255,255,true) end addEvent ("Armas_2", true) addEventHandler ("Armas_2", root, Armas_2) function Armas_3 () giveWeapon(source, 44, 1 ) outputChatBox("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: Você pego o Night Vision.",source,255,255,255,true) end addEvent ("Armas_3", true) 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("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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("[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: 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)) if (msgtype == 0) then if getElementData (source, "Tag_PainelBase", true) and isObjectInACLGroup("user."..login, aclGetGroup(Protecao)) then cancelEvent(true) outputChatBox("#ffffff✘ "..Tag.." #FFFFFF✘ - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: TagBase ~ " .. name .. ": " .. text) end end 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 ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: " .. getPlayerName(player) .. "#ffffff ғᴏɪ ᴀᴅɪᴄɪᴏɴᴀᴅᴏ ᴀᴏ ɢʀᴜᴘᴏ. "..groupname..".", source, 255, 255 ,255 ,true) outputChatBox ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: " .. getPlayerName(player) .. "#ffffff ᴠᴏᴄᴇ ғᴏɪ ᴀᴅɪᴄɪᴏɴᴀᴅᴏ ᴀᴏ ɢʀᴜᴘᴏ. "..groupname..".", player, 255, 255 ,255 ,true) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user."..getAccountName ( account ) ) setElementData(player,"Tag_PainelBase",true) outputChatBox ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: " .. getPlayerName(player) .. "#ffffff ғᴏɪ ʀᴇᴍᴏᴠɪᴅᴏ ᴀᴏ ɢʀᴜᴘᴏ. "..groupname..".", source, 255, 255 ,255 ,true) outputChatBox ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: " .. getPlayerName(player) .. "#ffffff ᴠᴏᴄᴇ ғᴏɪ ʀᴇᴍᴏᴠɪᴅᴏ ᴀᴏ ɢʀᴜᴘᴏ. "..groupname..".", player, 255, 255 ,255 ,true) end else outputChatBox ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: ᴏ ɢʀᴜᴘᴏ #FFFFFF" .. groupname .. "#ffffff ɴᴀᴏ ᴇxɪsᴛᴇ.", source, 255, 255 ,255 ,true) end else outputChatBox ( "[#00FF00ᴘᴀɪɴᴇʟ ᴅᴇ ʙᴀsᴇ ʙᴄʀ #FFFFFFᴠ3.0]: ᴇʀʀᴏʀ #02 | ᴏ ᴊᴏɢᴀᴅᴏʀ ɴᴀᴏ ᴇsᴛᴀ ʟᴏɢᴀᴅᴏ", 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 = true 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 CIDADÃO " ..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("ᴀs ᴄᴏɴғɪɢᴜʀᴀᴄᴏᴇs ᴅᴇ ʙᴀsᴇ ғᴏʀᴀᴍ sᴀʟᴠᴀs.") 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_BASE)) 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, 1000, 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(1), 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 ('[GERENCIADOR BCR] - 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 ('[GERENCIADOR BCR] - 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 ('[GERENCIADOR BCR] - sᴇɴʜᴀ ɪɴᴄᴏʀʀᴇᴛᴀ, ᴠᴏᴄᴇ ᴘᴏssᴜɪ a última ᴛᴇɴᴛᴀᴛɪᴠᴀs ʀᴇsᴛᴀɴᴛᴇs', source, 255, 255, 255, true) end if getElementData(source,"Portao_senha") == 1 then outputChatBox ('[GERENCIADOR BCR] - sᴇɴʜᴀ ɪɴᴄᴏʀʀᴇᴛᴀ, ᴠᴏᴄᴇ ᴘᴏssᴜɪ ᴍᴀɪs 1 ᴛᴇɴᴛᴀᴛɪᴠᴀs ʀᴇsᴛᴀɴᴛᴇs', source, 255, 255, 255, true) end if getElementData(source,"Portao_senha") == 0 then outputChatBox ('[GERENCIADOR BCR] - sᴇɴʜᴀ ɪɴᴄᴏʀʀᴇᴛᴀ, ᴠᴏᴄᴇ ᴘᴏssᴜɪ ᴍᴀɪs 2 ᴛᴇɴᴛᴀᴛɪᴠᴀs ʀᴇsᴛᴀɴᴛᴇs', source, 255, 255, 255, false) 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)