lucasvinicius Posted November 10, 2020 Share Posted November 10, 2020 eu não sei muito de script mais achei esse na net ele ta como arquivo Server.lua ele é um script de assalto o que tem nele é que quando vc ta na acl (ComandosPolicial) ele assalta e tudo mais eu queria separar a acl ex:deixar esse ComandosPolicial para os policiais verem a loja sendo assaltada e uma outra acl ex:Assalto para os bandidos assaltaram pois quando assalta todos na acl que esta no momento conseguem ver que ta tendo assalto ou seja quero que os bandidos não vejam tem como me ajudarem? esse é o script: --------- Variaveis local PedLoja = createPed(0, 2479.603515625, -1741.4840087891, 13.546875) setElementRotation(PedLoja, -0, 0, 284.044) setElementFrozen(PedLoja, true) local BlipLoja = createBlipAttachedTo(PedLoja, 17) local BlipLojaAssalta = createBlipAttachedTo(PedLoja, 18) setElementVisibleTo(BlipLojaAssalta, root, false) local DinheiroAdicionado = 2000 --Dinheiro roubado quando assaltar ---- Sistema function IniciarAssalto (Ped) if Ped == PedLoja then local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end if getElementData(source, "TS:Assaltando") then return end if getElementData(Ped, "TS:Assaltando") then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffEssa loja foi assaltada recentemente!", "info") return end local x, y, z = getElementPosition( source ) local x1, y1, z1 = getElementPosition( Ped ) local distance = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ) if distance >= 3 then return end triggerClientEvent(source, "TS:PainelAssalto2", source) end end addEventHandler ("onPlayerTarget", root, IniciarAssalto) function ComecarAAssaltar (source) if getElementData(source, "TS:Assaltando") then return end local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end for id, Policial in ipairs(getElementsByType("player")) do if isObjectInACLGroup ( "user." ..getAccountName (getPlayerAccount(Policial)), aclGetGroup ( "ComandosPolicia" ) ) then triggerClientEvent(Policial, "TS:MensagemPolicial2", Policial) setElementData(source, "TS:Assaltando", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(PedLoja, "SHOP", "SHP_Rob_GiveCash", -1, false) setElementFrozen(source, true) toggleAllControls(source, false) setElementPosition(source, 397.9880065918, -1522.498046875, 32.2734375) setElementRotation(source, -0, 0, 100.156) setElementData(PedLoja, "TS:Assaltando", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) LojaAssaltada(source) setTimer(function() setPedAnimation(source, nil) setPedAnimation(PedLoja, nil) setElementFrozen(source, false) toggleAllControls(source, true) local Dinheiro = getPlayerMoney ( source ) setPlayerMoney (source, Dinheiro + DinheiroAdicionado ) setElementData(source, "TS:Assaltando", false) end, 1*60000, 1) end end end addEvent("TS:IniciarAssalto2", true) addEventHandler("TS:IniciarAssalto2", root, ComecarAAssaltar) function LojaAssaltada(source) setElementVisibleTo(BlipLoja, root, false) setElementVisibleTo(BlipLojaAssalta, root, true) setTimer(function() setElementVisibleTo(BlipLoja, root, true) setElementVisibleTo(BlipLojaAssalta, root, false) setElementData(PedLoja, "TS:Assaltando", false) end, 7*60000, 1 ) end Link to comment
SrPattif Posted November 11, 2020 Share Posted November 11, 2020 Jesus, deixa eu ver se eu entendi: Aos na acl "Ilegal": pode assaltar, mas não recebe a notificação Aos na acl "policial": não pode assaltar e recebe a notificação Isso? Tente deixar a sua dúvida / problema de uma forma mais explicativa da próxima vez Link to comment
lucasvinicius Posted November 11, 2020 Author Share Posted November 11, 2020 quero uma acl para o assalto e uma para os policiais verem que a loja esta sendo assaltada Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now