#RooTs Posted May 20, 2014 Posted May 20, 2014 Alguem pode passa esse SCRIPT pra um grupo na ACL ? Nome do grupo é "Bope" só quem for do grupo "Bope" não aparecerá a estrela na cabeça... local Timer = {} Bribe = {} xMain_ = function( ) for index,v in ipairs (getElementsByType("player")) do xWanted_(v) end end addEventHandler("onResourceStart", resourceRoot, xMain_); xWanted_ = function(v) if not isElement(v) then return end Timer[v] = setTimer( function(player) if isElement(player) then local team = getPlayerTeam(player) if ( team and getTeamName(team) == "Police" ) then return end local Wanted = getPlayerWantedLevel ( player ); local x,y,z = getElementPosition ( player ); local Name = getPlayerName ( player ); if ( Wanted >= 1 ) then if Bribe[player] and isElement(Bribe[player]) then return end Bribe[player] = createObject(1247,x,y,z); attachElements (Bribe[player],player,0,0,1.6) ; outputChatBox(" [ "..Name.." ] Have [ "..Wanted.." ] Wanted Level! ",v,255,0,0,true); elseif ( Wanted == 0 and Bribe[player] and isElement(Bribe[player]) ) then destroyElement(Bribe[player]); Bribe[player] = nil end end end ,5000,0,v); end xJoin_ = function ( ) xWanted_(source); end addEventHandler("onPlayerJoin",root,xJoin_); xWantedDestroy_ = function ( ) if Timer[source] and isTimer(Timer[source]) then killTimer(Timer[source]); Timer[source] = nil end; if Bribe[source] and isElement(Bribe[source]) then destroyElement(Bribe[source]); Bribe[source] = nil end end addEventHandler("onPlayerQuit",root,xWantedDestroy_);
manawydan Posted May 20, 2014 Posted May 20, 2014 tentei ai não testado local Timer = {} Bribe = {} xMain_ = function( ) for index,v in ipairs (getElementsByType("player")) do xWanted_(v) end end addEventHandler("onResourceStart", resourceRoot, xMain_); xWanted_ = function(v) if not isElement(v) then return end Timer[v] = setTimer( function(player) if isElement(player) then local team = getPlayerTeam(player) local NomeAcl = getAccountName(getPlayerAccount(player)) if ( team and getTeamName(team) == "Police" ) or isObjectInACLGroup ("user."..NomeAcl, aclGetGroup ( "Bope" ) ) then return end local Wanted = getPlayerWantedLevel ( player ); local x,y,z = getElementPosition ( player ); local Name = getPlayerName ( player ); if ( Wanted >= 1 ) then if Bribe[player] and isElement(Bribe[player]) then return end Bribe[player] = createObject(1247,x,y,z); attachElements (Bribe[player],player,0,0,1.6) ; outputChatBox(" [ "..Name.." ] Have [ "..Wanted.." ] Wanted Level! ",v,255,0,0,true); elseif ( Wanted == 0 and Bribe[player] and isElement(Bribe[player]) ) then destroyElement(Bribe[player]); Bribe[player] = nil end end end ,5000,0,v); end xJoin_ = function ( ) xWanted_(source); end addEventHandler("onPlayerJoin",root,xJoin_); xWantedDestroy_ = function ( ) if Timer[source] and isTimer(Timer[source]) then killTimer(Timer[source]); Timer[source] = nil end; if Bribe[source] and isElement(Bribe[source]) then destroyElement(Bribe[source]); Bribe[source] = nil end end addEventHandler("onPlayerQuit",root,xWantedDestroy_); "Querer não é poder, mas tentar é avançar"!
#RooTs Posted May 21, 2014 Author Posted May 21, 2014 Deu certo, tem como deixa um blip pra ver no mapa quem esta sendo procurado ?
#RooTs Posted May 22, 2014 Author Posted May 22, 2014 tentei local x,y,z = getElementPosition ( player ); createBlip ( x, y, z, 56 ) mais nao foi
manawydan Posted May 22, 2014 Posted May 22, 2014 use essa função pra criar blip grudada em algum objeto. createBlipAttachedTo Ex: createBlipAttachedTo(player,56) "Querer não é poder, mas tentar é avançar"!
#RooTs Posted May 22, 2014 Author Posted May 22, 2014 Assim a linha 21 ta certa ? local Timer = {} Bribe = {} xMain_ = function( ) for index,v in ipairs (getElementsByType("player")) do xWanted_(v) end end addEventHandler("onResourceStart", resourceRoot, xMain_); xWanted_ = function(v) if not isElement(v) then return end Timer[v] = setTimer( function(player) if isElement(player) then local team = getPlayerTeam(player) local NomeAcl = getAccountName(getPlayerAccount(player)) if ( team and getTeamName(team) == "Police" ) or isObjectInACLGroup ("user."..NomeAcl, aclGetGroup ( "Bope" ) ) then return end local Wanted = getPlayerWantedLevel ( player ); local x,y,z = getElementPosition ( player ); local createBlipAttachedTo(player,56); -- isso ? local Name = getPlayerName ( player ); if ( Wanted >= 1 ) then if Bribe[player] and isElement(Bribe[player]) then return end Bribe[player] = createObject(1247,x,y,z); attachElements (Bribe[player],player,0,0,1.6) ; outputChatBox(" [ "..Name.." ] Have [ "..Wanted.." ] Wanted Level! ",v,255,0,0,true); elseif ( Wanted == 0 and Bribe[player] and isElement(Bribe[player]) ) then destroyElement(Bribe[player]); Bribe[player] = nil end end end ,5000,0,v); end xJoin_ = function ( ) xWanted_(source); end addEventHandler("onPlayerJoin",root,xJoin_); xWantedDestroy_ = function ( ) if Timer[source] and isTimer(Timer[source]) then killTimer(Timer[source]); Timer[source] = nil end; if Bribe[source] and isElement(Bribe[source]) then destroyElement(Bribe[source]); Bribe[source] = nil end end addEventHandler("onPlayerQuit",root,xWantedDestroy_);
manawydan Posted May 22, 2014 Posted May 22, 2014 sim, pode testar. "Querer não é poder, mas tentar é avançar"!
manawydan Posted May 22, 2014 Posted May 22, 2014 apague o local da frente da função ou adicione uma variavel e depois o = "Querer não é poder, mas tentar é avançar"!
DNL291 Posted May 23, 2014 Posted May 23, 2014 Coloque isso na linha 21: local blip = createBlipAttachedTo(player,56); E use destroyElement(blip) quando for necessário. E a propósito, não foi possível ver a imagem que você postou. Please do not PM me with scripting related question nor support, use the forums instead.
#RooTs Posted May 24, 2014 Author Posted May 24, 2014 Saudades de vc meu amigo DNL291, pode me mostra o EXEMPLO porque o Blip do player fico em cima do blip adicionado, tem como fazer ele por cima do blip do player ???
DNL291 Posted June 17, 2014 Posted June 17, 2014 Edita o recurso playerblips pra não criar o blip do jogador que estiver sendo procurado. Acho que não dá pra deixar o blip quadrado atrás do outro blip. Please do not PM me with scripting related question nor support, use the forums instead.
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