Jump to content

VORT3X

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

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

VORT3X's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Identical panels, only with different functions, giving interference, how to fix? the panels are separated by acl, but when I press the bind key, it opens the two, but it is not allowed to access the resources, but it gets in the way, because all corporation panels are the same, changing only the function and the acl group script: function SetCorpFT(player) if player and not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then setElementData (player,resname..":soucmd", true) setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE6")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE5")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE4")) then setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE3")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE2")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE1")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":soumembro", true) return 1 end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then SetCorpFT(pl) end end end, 10000, 0) function checkskinsBOPE ( ) if ( getElementType ( source ) == "player" ) then if ( getElementModel ( source ) == 255 ) then if getElementData(source,"vdbbopevtr1") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 256 ) then if getElementData(source,"vdbbopevtr2") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 257 ) then if getElementData(source,"vdbbopevtr3") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end end end addEventHandler("onElementModelChange",getRootElement(),checkskinsBOPE) function CorpSkinBOPE(id) if tonumber(id) then setElementModel ( source, id ) showBox(source,"info","Você pegou skin "..corp..":") end end addEvent(resname..":setarskin", true) addEventHandler(resname..":setarskin", root, CorpSkinBOPE) function CorpKitBOPE() setElementHealth(source, 200) setPedArmor(source, 100) giveWeapon(source, 3, 200, true) giveWeapon(source, 23, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 14, 200, true) showBox(source,"info","Você pegou Kit da "..corp..":") end addEvent(resname..":corpkitbope", true) addEventHandler(resname..":corpkitbope", root, CorpKitBOPE) function CorpTeleBaseBOPE () local CorpVTR = getPedOccupiedVehicle(source) if (CorpVTR) then setElementPosition(CorpVTR,1521.5, -1661.3000488281, 13.5) else setElementPosition(source,1521.5, -1661.3000488281, 13.5 ) end showBox(source,"info","Você teleportou-se para base da "..corp..":") end addEvent(resname..":corpteleportebasebope", true) addEventHandler(resname..":corpteleportebasebope", root, CorpTeleBaseBOPE) local CorpVTRBOPE = {} function CorpVTRvdbBOPE(viatura) local veiculo = getPedOccupiedVehicle ( source ) if veiculo and getVehicleController(veiculo) == source and isElement( CorpVTRBOPE[source] ) and veiculo == CorpVTRBOPE[source] then if tonumber(viatura) == 1 then setElementModel (veiculo,tonumber(547)) elseif tonumber(viatura) == 2 then setElementModel (veiculo,tonumber(490)) setVehicleColor(veiculo,255,255,255,255,255,255) elseif tonumber(viatura) == 3 then setElementModel (veiculo,tonumber(427)) elseif tonumber(viatura) == 4 then setElementModel (veiculo,tonumber(497)) end else if CorpVTRBOPE[source] and isElement( CorpVTRBOPE[source] ) then destroyElement( CorpVTRBOPE[source] ) CorpVTRBOPE[source] = nil end local x,y,z = getElementPosition(source) if tonumber(viatura) == 1 then CorpVTRBOPE[source] = createVehicle(547, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 2 then CorpVTRBOPE[source] = createVehicle(490, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) setVehicleColor(CorpVTRBOPE[source],255,255,255,255,255,255) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 3 then CorpVTRBOPE[source] = createVehicle(427, x,y,z) setVehicleDamageProof() warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end if tonumber(viatura) == 4 then CorpVTRBOPE[source] = createVehicle(497, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end end end addEvent(resname..":corpviatura", true) addEventHandler(resname..":corpviatura", root, CorpVTRvdbBOPE) function CorpDestruirVTRBOPE() if CorpVTRBOPE[source] and isElement( CorpVTRBOPE[source] ) then destroyElement( CorpVTRBOPE[source] ) CorpVTRBOPE[source] = nil showBox(source,"info","Viatura destruida") end end addEvent(resname..":corpdestruirviatura", true) addEventHandler(resname..":corpdestruirviatura", root, CorpDestruirVTRBOPE) addEventHandler ("onPlayerQuit", root, CorpDestruirVTRBOPE) p_lights = {} p_timer = {} p_lvar = {} function CorpLuzesBOPE() local veh = getPedOccupiedVehicle(source) local id = getElementModel(veh) if (id == 547) or (id == 490) or (id == 427) or (id == 497) or (id == 427) or (id == 523) or (id == 490) or (id == 416) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 showBox(source,"info","Luzes de Alerta ligadas") setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 showBox(source,"info","Luzes de Alerta desligadas") killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end else showBox(source,"info","Este Veiculo Não é uma Viatura") end end addEvent(resname..":corpluzesbope", true) addEventHandler(resname..":corpluzesbope", root, CorpLuzesBOPE() addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end) function CorpAbandonarBOPE(cargo) local acl = aclGetGroup(cargo) if (acl) then local conta = getAccountName(getPlayerAccount(source)) local checkacl = isObjectInACLGroup ( "user." ..conta, acl) if (checkacl) then aclGroupRemoveObject(acl, "user."..conta) showBox(source,"info",""..corp..": Você abandonou a Corporação") setElementData (source, "vdbsoumembroBOPE",false) outputServerLog("ABANDONOU "..corp..": "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..cargo.."") end end end addEvent(resname..":abandonarcorpbope", true) addEventHandler(resname..":abandonarcorpbope", getRootElement(), CorpAbandonarBOPE) function IsCorpGroupBOPE ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local InBOPE = false for _, group in ipairs ( {"BOPECMD","BOPE6","BOPE5","BOPE4","BOPE3","BOPE2","BOPE1"} ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then InBOPE = true break end end return InBOPE end function CorpGetMembrosActBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if getElementDimension( players) == 0 and getElementInterior(players) == 0 and not isGuestAccount ( getPlayerAccount ( players ) ) then if ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpmembrosativobope",true) addEventHandler(resname..":corpmembrosativobope",root,CorpGetMembrosActBOPE) function CorpGetMembrosBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corptodosmembrosbope",true) addEventHandler(resname..":corptodosmembrosbope",root,CorpGetMembrosBOPE) function CorpGetAllPlayersBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if not isGuestAccount ( getPlayerAccount ( players ) ) and not ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpgetplayersbope",true) addEventHandler(resname..":corpgetplayersbope",root,CorpGetAllPlayersBOPE) function CorpIrBOPE(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(source) if (veiculotp) then showBox(source,"error","Saia do Veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(playerair) setElementPosition(source, x, y, z + 2) showBox(source,"info","Você se teleportou até o jogador "..irtp.."") outputServerLog("TELEPORTE BOPE: Foi "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TeleIrCorpbope", true) addEventHandler(resname..":TeleIrCorpbope", root, CorpIrBOPE) function CorpPuxarBOPE(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(playerair) if (veiculotp) then showBox(source,"error","O Jogador esta em um veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(source) setElementPosition(playerair, x, y, z + 2) showBox(source,"info","Você puxou o jogador "..irtp.." ") showBox(playerair,"info",""..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." puxou você") outputServerLog("TELEPORTE BOPE: Puxou "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TelePuxarCorpbope", true) addEventHandler(resname..":TelePuxarCorpbope", root, CorpPuxarBOPE) function CorpRemoverMembroBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"error",""..corp..": Você foi removido da Corporação") outputServerLog("EXPULSO "..corp..":: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corpremovermembrobope", true) addEventHandler(resname..":corpremovermembrobope", getRootElement(), CorpRemoverMembroBOPE) function CorpRecrutarBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) --for _, checkcorp in ipairs ({}) do for _, checkcorp in ipairs ({"Suporte"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"info",""..corp..": Você foi Recrutado (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Recrutou o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("RECRUTAMENTO "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corprecrutarbope", true) addEventHandler(resname..":corprecrutarbope", getRootElement(), CorpRecrutarBOPE) function CorpPromoverBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) for _, checkcorp in ipairs ({"Suporte"}) do --for _, checkcorp in ipairs ({}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"info",""..corp..": Você foi Promovido (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Promoveu o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("PROMOVEU "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corppromoverbope", true) addEventHandler(resname..":corppromoverbope", getRootElement(), CorpPromoverBOPE) function CorpOneACLBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroBOPE",false) outputServerLog(""..corp..": CARGO ONE: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":CorpCagoOnebope", true) addEventHandler(resname..":CorpCagoOnebope", getRootElement(), CorpOneACLBOPE) function QuitRemoverCorpBOPE () if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("BOPE1")) then aclGroupRemoveObject (aclGetGroup("BOPE1"), "user."..getAccountName(getPlayerAccount(source))) end end addEventHandler ( "onPlayerQuit", getRootElement(),QuitRemoverCorpBOPE) function CorpAcessoBOPE() showBoxBOPE(source,"error","Acesso não permitido") end addEvent("acessonegadobope", true) addEventHandler("acessonegadobope", root,CorpAcessoBOPE) function showBoxBOPE(player, value, str) if isElement(player) then triggerClientEvent(player, "CreateBox", getRootElement(), value, str) end end function corpmsgbope(source,type,msg) if source and type and msg then showBoxBOPE(source,type,msg) end end addEvent(resname..":corpmsgbope", true) addEventHandler(resname..":corpmsgbope", root, corpmsgbope)
  2. [PT-BR] Paineis identicos, apenas com as function diferentes, dando interferencia, como arrumar ? os paineis são separados por acl, mas quando aperto a bind key, ele abre os dois, mas não tem permissão para acessar os recursos, mesmo assim atrapalha, por que todos os paineis das corporaçoes, são o mesmo, alterando apenas as function e o grupo de acl script:
  3. function SetCorpFT(player) if player and not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then setElementData (player,resname..":soucmd", true) setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE6")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE5")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE4")) then setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE3")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE2")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE1")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":soumembro", true) return 1 end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then SetCorpFT(pl) end end end, 10000, 0) function checkskinsBOPE ( ) if ( getElementType ( source ) == "player" ) then if ( getElementModel ( source ) == 255 ) then if getElementData(source,"vdbbopevtr1") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 256 ) then if getElementData(source,"vdbbopevtr2") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 257 ) then if getElementData(source,"vdbbopevtr3") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end end end addEventHandler("onElementModelChange",getRootElement(),checkskinsBOPE) function CorpSkinBOPE(id) if tonumber(id) then setElementModel ( source, id ) showBox(source,"info","Você pegou skin "..corp..":") end end addEvent(resname..":setarskin", true) addEventHandler(resname..":setarskin", root, CorpSkinBOPE) function CorpKitBOPE() setElementHealth(source, 200) setPedArmor(source, 100) giveWeapon(source, 3, 200, true) giveWeapon(source, 23, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 14, 200, true) showBox(source,"info","Você pegou Kit da "..corp..":") end addEvent(resname..":corpkitbope", true) addEventHandler(resname..":corpkitbope", root, CorpKitBOPE) function CorpTeleBaseBOPE () local CorpVTR = getPedOccupiedVehicle(source) if (CorpVTR) then setElementPosition(CorpVTR,1521.5, -1661.3000488281, 13.5) else setElementPosition(source,1521.5, -1661.3000488281, 13.5 ) end showBox(source,"info","Você teleportou-se para base da "..corp..":") end addEvent(resname..":corpteleportebasebope", true) addEventHandler(resname..":corpteleportebasebope", root, CorpTeleBaseBOPE) local CorpVTRBOPE = {} function CorpVTRvdbBOPE(viatura) local veiculo = getPedOccupiedVehicle ( source ) if veiculo and getVehicleController(veiculo) == source and isElement( CorpVTRBOPE[source] ) and veiculo == CorpVTRBOPE[source] then if tonumber(viatura) == 1 then setElementModel (veiculo,tonumber(547)) elseif tonumber(viatura) == 2 then setElementModel (veiculo,tonumber(490)) setVehicleColor(veiculo,255,255,255,255,255,255) elseif tonumber(viatura) == 3 then setElementModel (veiculo,tonumber(427)) elseif tonumber(viatura) == 4 then setElementModel (veiculo,tonumber(497)) end else if CorpVTRBOPE[source] and isElement( CorpVTRBOPE[source] ) then destroyElement( CorpVTRBOPE[source] ) CorpVTRBOPE[source] = nil end local x,y,z = getElementPosition(source) if tonumber(viatura) == 1 then CorpVTRBOPE[source] = createVehicle(547, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 2 then CorpVTRBOPE[source] = createVehicle(490, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) setVehicleColor(CorpVTRBOPE[source],255,255,255,255,255,255) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 3 then CorpVTRBOPE[source] = createVehicle(427, x,y,z) setVehicleDamageProof() warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end if tonumber(viatura) == 4 then CorpVTRBOPE[source] = createVehicle(497, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end end end addEvent(resname..":corpviatura", true) addEventHandler(resname..":corpviatura", root, CorpVTRvdbBOPE) function CorpDestruirVTRBOPE() if CorpVTRBOPE[source] and isElement( CorpVTRBOPE[source] ) then destroyElement( CorpVTRBOPE[source] ) CorpVTRBOPE[source] = nil showBox(source,"info","Viatura destruida") end end addEvent(resname..":corpdestruirviatura", true) addEventHandler(resname..":corpdestruirviatura", root, CorpDestruirVTRBOPE) addEventHandler ("onPlayerQuit", root, CorpDestruirVTRBOPE) p_lights = {} p_timer = {} p_lvar = {} function CorpLuzesBOPE() local veh = getPedOccupiedVehicle(source) local id = getElementModel(veh) if (id == 547) or (id == 490) or (id == 427) or (id == 497) or (id == 427) or (id == 523) or (id == 490) or (id == 416) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 showBox(source,"info","Luzes de Alerta ligadas") setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 showBox(source,"info","Luzes de Alerta desligadas") killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end else showBox(source,"info","Este Veiculo Não é uma Viatura") end end addEvent(resname..":corpluzesbope", true) addEventHandler(resname..":corpluzesbope", root, CorpLuzesBOPE() addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end) function CorpAbandonarBOPE(cargo) local acl = aclGetGroup(cargo) if (acl) then local conta = getAccountName(getPlayerAccount(source)) local checkacl = isObjectInACLGroup ( "user." ..conta, acl) if (checkacl) then aclGroupRemoveObject(acl, "user."..conta) showBox(source,"info",""..corp..": Você abandonou a Corporação") setElementData (source, "vdbsoumembroBOPE",false) outputServerLog("ABANDONOU "..corp..": "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..cargo.."") end end end addEvent(resname..":abandonarcorpbope", true) addEventHandler(resname..":abandonarcorpbope", getRootElement(), CorpAbandonarBOPE) function IsCorpGroupBOPE ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local InBOPE = false for _, group in ipairs ( {"BOPECMD","BOPE6","BOPE5","BOPE4","BOPE3","BOPE2","BOPE1"} ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then InBOPE = true break end end return InBOPE end function CorpGetMembrosActBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if getElementDimension( players) == 0 and getElementInterior(players) == 0 and not isGuestAccount ( getPlayerAccount ( players ) ) then if ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpmembrosativobope",true) addEventHandler(resname..":corpmembrosativobope",root,CorpGetMembrosActBOPE) function CorpGetMembrosBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corptodosmembrosbope",true) addEventHandler(resname..":corptodosmembrosbope",root,CorpGetMembrosBOPE) function CorpGetAllPlayersBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if not isGuestAccount ( getPlayerAccount ( players ) ) and not ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpgetplayersbope",true) addEventHandler(resname..":corpgetplayersbope",root,CorpGetAllPlayersBOPE) function CorpIrBOPE(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(source) if (veiculotp) then showBox(source,"error","Saia do Veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(playerair) setElementPosition(source, x, y, z + 2) showBox(source,"info","Você se teleportou até o jogador "..irtp.."") outputServerLog("TELEPORTE BOPE: Foi "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TeleIrCorpbope", true) addEventHandler(resname..":TeleIrCorpbope", root, CorpIrBOPE) function CorpPuxarBOPE(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(playerair) if (veiculotp) then showBox(source,"error","O Jogador esta em um veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(source) setElementPosition(playerair, x, y, z + 2) showBox(source,"info","Você puxou o jogador "..irtp.." ") showBox(playerair,"info",""..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." puxou você") outputServerLog("TELEPORTE BOPE: Puxou "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TelePuxarCorpbope", true) addEventHandler(resname..":TelePuxarCorpbope", root, CorpPuxarBOPE) function CorpRemoverMembroBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"error",""..corp..": Você foi removido da Corporação") outputServerLog("EXPULSO "..corp..":: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corpremovermembrobope", true) addEventHandler(resname..":corpremovermembrobope", getRootElement(), CorpRemoverMembroBOPE) function CorpRecrutarBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) --for _, checkcorp in ipairs ({}) do for _, checkcorp in ipairs ({"Suporte"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"info",""..corp..": Você foi Recrutado (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Recrutou o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("RECRUTAMENTO "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corprecrutarbope", true) addEventHandler(resname..":corprecrutarbope", getRootElement(), CorpRecrutarBOPE) function CorpPromoverBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) for _, checkcorp in ipairs ({"Suporte"}) do --for _, checkcorp in ipairs ({}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"info",""..corp..": Você foi Promovido (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Promoveu o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("PROMOVEU "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corppromoverbope", true) addEventHandler(resname..":corppromoverbope", getRootElement(), CorpPromoverBOPE) function CorpOneACLBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroBOPE",false) outputServerLog(""..corp..": CARGO ONE: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":CorpCagoOnebope", true) addEventHandler(resname..":CorpCagoOnebope", getRootElement(), CorpOneACLBOPE) function QuitRemoverCorpBOPE () if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("BOPE1")) then aclGroupRemoveObject (aclGetGroup("BOPE1"), "user."..getAccountName(getPlayerAccount(source))) end end addEventHandler ( "onPlayerQuit", getRootElement(),QuitRemoverCorpBOPE) function CorpAcessoBOPE() showBoxBOPE(source,"error","Acesso não permitido") end addEvent("acessonegadobope", true) addEventHandler("acessonegadobope", root,CorpAcessoBOPE) function showBoxBOPE(player, value, str) if isElement(player) then triggerClientEvent(player, "CreateBox", getRootElement(), value, str) end end function corpmsgbope(source,type,msg) if source and type and msg then showBoxBOPE(source,type,msg) end end addEvent(resname..":corpmsgbope", true) addEventHandler(resname..":corpmsgbope", root, corpmsgbope) Other Panel Tactical Forty function SetCorp(player) if player and not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then setElementData (player,resname..":soucmd", true) setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT6")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT5")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT4")) then setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT3")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT2")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT1")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":soumembro", true) return 1 end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then SetCorp(pl) end end end, 10000, 0) function checkskinsFT ( ) if ( getElementType ( source ) == "player" ) then if ( getElementModel ( source ) == 96 ) then if getElementData(source,"vdbftvtr1") == false and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 286 ) then if getElementData(source,"vdbftvtr2") == false and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 97 ) then if getElementData(source,"vdbftvtr3") == false and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end end end addEventHandler("onElementModelChange",getRootElement(),checkskinsFT) function CorpSkin(id) if tonumber(id) then setElementModel ( source, id ) showBox(source,"info","Você pegou skin "..corp..":") end end addEvent(resname..":setarskin", true) addEventHandler(resname..":setarskin", root, CorpSkin) function CorpKit() setElementHealth(source, 200) setPedArmor(source, 100) giveWeapon(source, 3, 200, true) giveWeapon(source, 23, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 14, 200, true) showBox(source,"info","Você pegou Kit da "..corp..":") end addEvent(resname..":corpkit", true) addEventHandler(resname..":corpkit", root, CorpKit) function CorpTeleBase () local CorpVTR = getPedOccupiedVehicle(source) if (CorpVTR) then setElementPosition(CorpVTR,2184.8012695313, -1794.8519287109, 13.366186141968) else setElementPosition(source,2184.8012695313, -1794.8519287109, 13.366186141968 ) end showBox(source,"info","Você teleportou-se para base da "..corp..":") end addEvent(resname..":corpteleportebase", true) addEventHandler(resname..":corpteleportebase", root, CorpTeleBase) local CorpVTR = {} function CorpVTRvdb(viatura) local veiculo = getPedOccupiedVehicle ( source ) if veiculo and getVehicleController(veiculo) == source and isElement( CorpVTR[source] ) and veiculo == CorpVTR[source] then if tonumber(viatura) == 1 then setElementModel (veiculo,tonumber(598)) elseif tonumber(viatura) == 2 then setElementModel (veiculo,tonumber(496)) setVehicleColor(veiculo,255,255,255,255,255,255) elseif tonumber(viatura) == 3 then setElementModel (veiculo,tonumber(523)) elseif tonumber(viatura) == 4 then setElementModel (veiculo,tonumber(497)) end else if CorpVTR[source] and isElement( CorpVTR[source] ) then destroyElement( CorpVTR[source] ) CorpVTR[source] = nil end local x,y,z = getElementPosition(source) if tonumber(viatura) == 1 then CorpVTR[source] = createVehicle(598, x,y,z) warpPedIntoVehicle (source,CorpVTR[source]) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 2 then CorpVTR[source] = createVehicle(496, x,y,z) warpPedIntoVehicle (source,CorpVTR[source]) setVehicleColor(CorpVTR[source],255,255,255,255,255,255) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 3 then CorpVTR[source] = createVehicle(523, x,y,z) setVehicleDamageProof() warpPedIntoVehicle (source,CorpVTR[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end if tonumber(viatura) == 4 then CorpVTR[source] = createVehicle(497, x,y,z) warpPedIntoVehicle (source,CorpVTR[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end end end addEvent(resname..":corpviatura", true) addEventHandler(resname..":corpviatura", root, CorpVTRvdb) function CorpDestruirVTR() if CorpVTR[source] and isElement( CorpVTR[source] ) then destroyElement( CorpVTR[source] ) CorpVTR[source] = nil showBox(source,"info","Viatura destruida") end end addEvent(resname..":corpdestruirviatura", true) addEventHandler(resname..":corpdestruirviatura", root, CorpDestruirVTR) addEventHandler ("onPlayerQuit", root, CorpDestruirVTR) p_lights = {} p_timer = {} p_lvar = {} function CorpLuzes() local veh = getPedOccupiedVehicle(source) local id = getElementModel(veh) if (id == 598) or (id == 496) or (id == 523) or (id == 497) or (id == 427) or (id == 523) or (id == 490) or (id == 416) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 showBox(source,"info","Luzes de Alerta ligadas") setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 showBox(source,"info","Luzes de Alerta desligadas") killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end else showBox(source,"info","Este Veiculo Não é uma Viatura") end end addEvent(resname..":corpluzes", true) addEventHandler(resname..":corpluzes", root, CorpLuzes) addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end) function CorpAbandonar(cargo) local acl = aclGetGroup(cargo) if (acl) then local conta = getAccountName(getPlayerAccount(source)) local checkacl = isObjectInACLGroup ( "user." ..conta, acl) if (checkacl) then aclGroupRemoveObject(acl, "user."..conta) showBox(source,"info",""..corp..": Você abandonou a Corporação") setElementData (source, "vdbsoumembroFT",false) outputServerLog("ABANDONOU "..corp..": "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..cargo.."") end end end addEvent(resname..":abandonarcorp", true) addEventHandler(resname..":abandonarcorp", getRootElement(), CorpAbandonar) function IsCorpGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local InFT = false for _, group in ipairs ( {"FTCMD","FT6","FT5","FT4","FT3","FT2","FT1"} ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then InFT = true break end end return InFT end function CorpGetMembrosAct(player) local info = {} for _,players in pairs(getElementsByType("player")) do if getElementDimension( players) == 0 and getElementInterior(players) == 0 and not isGuestAccount ( getPlayerAccount ( players ) ) then if ( IsCorpGroup ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpmembrosativo",true) addEventHandler(resname..":corpmembrosativo",root,CorpGetMembrosAct) function CorpGetMembros(player) local info = {} for _,players in pairs(getElementsByType("player")) do if ( IsCorpGroup ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corptodosmembros",true) addEventHandler(resname..":corptodosmembros",root,CorpGetMembros) function CorpGetAllPlayers(player) local info = {} for _,players in pairs(getElementsByType("player")) do if not isGuestAccount ( getPlayerAccount ( players ) ) and not ( IsCorpGroup ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpgetplayers",true) addEventHandler(resname..":corpgetplayers",root,CorpGetAllPlayers) function CorpIr(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(source) if (veiculotp) then showBox(source,"error","Saia do Veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(playerair) setElementPosition(source, x, y, z + 2) showBox(source,"info","Você se teleportou até o jogador "..irtp.."") outputServerLog("TELEPORTE FT: Foi "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TeleIrCorp", true) addEventHandler(resname..":TeleIrCorp", root, CorpIr) function CorpPuxar(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(playerair) if (veiculotp) then showBox(source,"error","O Jogador esta em um veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(source) setElementPosition(playerair, x, y, z + 2) showBox(source,"info","Você puxou o jogador "..irtp.." ") showBox(playerair,"info",""..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." puxou você") outputServerLog("TELEPORTE FT: Puxou "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TelePuxarCorp", true) addEventHandler(resname..":TelePuxarCorp", root, CorpPuxar) function CorpRemoverMembro(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroFT",false) showBox(arecrutar,"error",""..corp..": Você foi removido da Corporação") outputServerLog("EXPULSO "..corp..":: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corpremovermembro", true) addEventHandler(resname..":corpremovermembro", getRootElement(), CorpRemoverMembro) function CorpRecrutar(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) --for _, checkcorp in ipairs ({"Console","Admin","SuperModerator","Moderator","Suporte","PMCMD","PM6","PM5","PM4","PM3","PM2","PM1"}) do for _, checkcorp in ipairs ({"Suporte"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroFT",false) showBox(arecrutar,"info",""..corp..": Você foi Recrutado (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Recrutou o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("RECRUTAMENTO "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corprecrutar", true) addEventHandler(resname..":corprecrutar", getRootElement(), CorpRecrutar) function CorpPromover(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) for _, checkcorp in ipairs ({"Suporte"}) do --for _, checkcorp in ipairs ({"Console","Admin","SuperModerator","Moderator","Suporte","PMCMD","PM6","PM5","PM4","PM3","PM2","PM1"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroFT",false) showBox(arecrutar,"info",""..corp..": Você foi Promovido (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Promoveu o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("PROMOVEU "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corppromover", true) addEventHandler(resname..":corppromover", getRootElement(), CorpPromover) function CorpOneACL(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroFT",false) outputServerLog(""..corp..": CARGO ONE: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":CorpCagoOne", true) addEventHandler(resname..":CorpCagoOne", getRootElement(), CorpOneACL) function QuitRemoverCorp () if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("FT1")) then aclGroupRemoveObject (aclGetGroup("FT1"), "user."..getAccountName(getPlayerAccount(source))) end end addEventHandler ( "onPlayerQuit", getRootElement(),QuitRemoverCorp) function CorpAcesso() showBox(source,"error","Acesso não permitido") end addEvent("acessonegado", true) addEventHandler("acessonegado", root,CorpAcesso) function showBox(player, value, str) if isElement(player) then triggerClientEvent(player, "CreateBox", getRootElement(), value, str) end end function corpmsg(source,type,msg) if source and type and msg then showBox(source,type,msg) end end addEvent(resname..":corpmsg", true) addEventHandler(resname..":corpmsg", root, corpmsg)
  4. local defaults = {} local function loadDefaults () defaults.luac = get 'luac', defaults.prep = get 'prep', defaults.prepa = get 'prepa', defaults.prepcache = get 'prepcache', defaults.luaccache = get 'luaccache', defaults.suffix = get 'suffix', defaults.extension = get 'extension', defaults.naming = get 'naming',--order is important, e=strip extension, s=add suffix, t=replace with target if target exists defaults.tgt = '', end loadDefaults() local function validateSetting ( key, value ) --TODO: create setting validator end local function processName ( name, naming, extension, suffix, target ) extension = extension or '' suffix = suffix or '' target = target or '' for directive in naming:gmatch '.' do if directive == 'e' then --extension is escaped and anchored to the string's end first name = name:gsub ( extension:gsub ( '%W', '%%%1' ) .. '$', '' )--remove extension elseif directive == 's' then name = name .. suffix--adds suffix elseif directive == 't' then name = #tgt > 0 and tgt or name--replace with target else outputDebugString ( "invalid naming directive: " .. directive, 2 ) end end return name end function processResource ( resourceName ) local metaxml = XML.load ( ':' .. resourceName .. '/meta.xml' ) or error "failed loading meta.xml" local defaults = { luac = get 'luac', prep = get 'prep', prepa = get 'prepa', prepcache = get 'prepcache', luaccache = get 'luaccache', suffix = get 'suffix', extension = get 'extension', naming = get 'naming',--order is important, e=strip extension, s=add suffix, t=replace with target if target exists tgt = '', } for l1i, l1node in ipairs ( metaxml.children ) do outputDebugString ( l1i .. ":" .. l1node.name ) if l1node.name == 'build' then for l2i, l2node in ipairs ( l1node.children ) do outputDebugString ( l2node.name ) if l2node.name == 'setting' then--update build settings local k, v = l2node:getAttribute 'key', l2node:getAttribute 'value' defaults [ k ] = v elseif l2node.name == 'obj' then--build directives for a file local src = l2node:getAttribute 'src' or error 'no src attribute' local tgt = l2node:getAttribute 'tgt' or defaults.tgt local luac = l2node:getAttribute 'luac' or defaults.luac local prep = l2node:getAttribute 'prep' or defaults.prep local prepa = l2node:getAttribute 'prepa' or defaults.prepa local luaccache = l2node:getAttribute 'luaccache' or defaults.luaccache local prepcache = l2node:getAttribute 'prepcache' or defaults.prepcache local naming = l2node:getAttribute 'naming' or defaults.naming local extension = l2node:getAttribute 'extension' or defaults.extension local suffix = l2node:getAttribute 'suffix' or defaults.suffix local out = src local srcf = File ( ':' .. resourceName .. '/' .. src, true ) local buffer = srcf:read ( srcf:getSize () ) buffer = prep == '1' and getPreProcessed ( buffer, loadstring ( 'return ' .. prepa ) () ) or buffer for directive in naming:gmatch '.' do if directive == 'e' then --extension is escaped and anchored to the string's end first out = out:gsub ( extension:gsub ( '%W', '%%%1' ) .. '$', '' )--remove extension elseif directive == 's' then out = out .. suffix--adds suffix elseif directive == 't' then out = #tgt > 0 and tgt or out--replace with target else outputDebugString ( "invalid naming directive: " .. directive, 2 ) end end outputDebugString ( 'out: ' .. tostring ( out ) ) assert ( out ~= src, "Output file is same as input, build aborted to prevent information loss" ) --TODO: send to compiler ---[[ out = ':' .. resourceName .. '/' .. out File.delete ( out )--remove previous output local outf = File.new ( out ) outf:write ( buffer ) outf:close () --]] outputDebugString ( "processed " .. src .. " to " .. out ) end end end end return true end
  5. Estou Enteressado No Produto , Ainda Esta Vendendo ? Irei Colocar No Meu Servidor De Rust Que Esta Aberto
  6. Pessoal a Pouco Tempo Comecei a Trabalhar Com Linguagem. Lua e Para Conseguir Cria Meu Servidor e Ser Independente De Precisar Pegar Um Painel Entrar Ou Um Script Em SItes Apr Aprendi Bastante Coisa Mais Pulei a Peça Do Painel Login e Queria Saber Se Voces Pode Explicar Como Consigo Criar Short Time Staff I Started Working With Language. Moon and To Be able to Create My Server And Be Independent Of Need To Pick A Login Panel Or A Script In SItes I Learned A Lot More Thing I Have Skipped The Part Of The Login Panel And I Wanted To Know If You Can Explain How I Can Create Краткосрочный персонал Я начал работать с языком. Луна и иметь возможность создавать свой сервер и быть независимыми от необходимости выбирать панель входа или сценарий В SItes я узнал, что многое другое, что я пропустил часть панели входа в систему, и я хотел узнать, можете ли вы объяснить, как я могу создать
×
×
  • Create New...