Sucrilhex Posted April 6, 2020 Share Posted April 6, 2020 Olá, gostaria de saber como deixo um blip fixo, após um jogador atirar aparece onde ele está, eu gostaria de por pra fixar o local, pra não ter a localizacão exata do jogador tiro = 0 Acl = "Console" function test (weapon, endX, endY, endZ, hitElement, startX, startY, startZ) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) for i, player in ipairs (getElementsByType ("player")) do if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (player)), aclGetGroup (Acl)) then if tiro == 0 then exports.Res_dxmessages:outputDx(player, "Denuncia de Tiros Em "..loc.." ("..city..")", "info") local blip = createBlipAttachedTo ( source, 30 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 60000, 1) tiro = 0 end end end end addEventHandler ("onPlayerWeaponFire", root, test ) Link to comment
Angelo Pereira Posted April 6, 2020 Share Posted April 6, 2020 Fiz algumas correções, e adicione o blip apenas no local. local tiro = true --/> Alterado local Acl = "Console" function tiro_localizar ( ) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) for i, player in ipairs (getElementsByType ("player")) do if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (player)), aclGetGroup (Acl)) then if tiro == true then tiro = false --/> Movido exports.Res_dxmessages:outputDx(player, "Denuncia de Tiros Em "..loc.." ("..city..")", "info") local blip = createBlip( x, y, z, 30, 1, 255, 255, 255, 255, 0, 65535, player) setTimer ( function( ) destroyElement(blip) tiro = true --/> Movido end, 60000, 1) end end end end addEventHandler ("onPlayerWeaponFire", root, tiro_localizar ) 1 Link to comment
Sucrilhex Posted April 7, 2020 Author Share Posted April 7, 2020 10 hours ago, Angelo Pereira said: Fiz algumas correções, e adicione o blip apenas no local. local tiro = true --/> Alterado local Acl = "Console" function tiro_localizar ( ) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) for i, player in ipairs (getElementsByType ("player")) do if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (player)), aclGetGroup (Acl)) then if tiro == true then tiro = false --/> Movido exports.Res_dxmessages:outputDx(player, "Denuncia de Tiros Em "..loc.." ("..city..")", "info") local blip = createBlip( x, y, z, 30, 1, 255, 255, 255, 255, 0, 65535, player) setTimer ( function( ) destroyElement(blip) tiro = true --/> Movido end, 60000, 1) end end end end addEventHandler ("onPlayerWeaponFire", root, tiro_localizar ) obrigado : ) 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