Sign in to follow this  
jakson

help

Recommended Posts

olá pessoal, eu tenho problema com esse script, quando o clan é None destrua o blip mas não está funcionando .. por favor alguém pode me ajudar?

 

local ClanBlips = {}

setTimer(
function ()		
local myClan = getElementData(localPlayer,"Clan")		
for k,thePlayer in ipairs(getElementsByType("player")) do
if ( isElement( thePlayer ) ) and ( thePlayer ~= localPlayer ) then
if ( getPlayerTeam( thePlayer ) ) then					
local theirClan = getElementData(thePlayer,"Clan")					
if myClan ~= theirClan then						
if ( ( ClanBlips[thePlayer] ) ) then							
if (ClanBlips[thePlayer]) then								
exports.customblips:destroyCustomBlip(ClanBlips[thePlayer])	
ClanBlips[thePlayer] = nil							
end						
end					
end					
if getElementDimension(localPlayer) ~= getElementDimension(thePlayer) then
if ( ( ClanBlips[thePlayer] ) ) then							
if (ClanBlips[thePlayer]) then								
exports.customblips:destroyCustomBlip(ClanBlips[thePlayer])								
ClanBlips[thePlayer] = nil							
end						
end					
end					
if getElementInterior(localPlayer) ~= getElementInterior(thePlayer) then
if ( ( ClanBlips[thePlayer] ) ) then							
if (ClanBlips[thePlayer]) then								
exports.customblips:destroyCustomBlip(ClanBlips[thePlayer])	
ClanBlips[thePlayer] = nil							
end						
end					
end					
if getElementData(localPlayer,"Clan") == "None" or getElementData(localPlayer,"Clan") == "none" or getElementData(localPlayer,"Clan") == nil then						
if ( ( ClanBlips[thePlayer] ) ) then							
exports.customblips:destroyCustomBlip(ClanBlips[thePlayer])							
ClanBlips[thePlayer] = nil	
ClanBlips = {}					
end					
end					
if ( myClan == theirClan ) then						
if not ( ClanBlips[thePlayer] ) then							
if getElementDimension(localPlayer) == getElementDimension(thePlayer) then								
if getElementInterior(localPlayer) == getElementInterior(thePlayer) then									
local x,y,z = getElementPosition(thePlayer)									
ClanBlips[thePlayer] = exports.customblips:createCustomBlip(x,y, 14, 14, "blip1.png",5000)									
exports.customblips:setCustomBlipRadarScale(ClanBlips[thePlayer],3)								
end							
end						
else							
if getElementDimension(localPlayer) == getElementDimension(thePlayer) then								
local x,y,z = getElementPosition(thePlayer)								
exports.customblips:setCustomBlipPosition(ClanBlips[thePlayer],x,y)							
end						
end					
end				
end			
end		
end	
end,1000,0)

addEventHandler("onClientPlayerQuit",root,	
function ()		
if ( ( ClanBlips[source] ) ) then			
exports.customblips:destroyCustomBlip(ClanBlips[source])			
ClanBlips[source] = nil		
end	
end)
Eu acho que o problema está nessa linha
if getElementData(localPlayer,"Clan") == "None" or getElementData(localPlayer,"Clan") == "none" or getElementData(localPlayer,"Clan") == nil then						
if ( ( ClanBlips[thePlayer] ) ) then							
exports.customblips:destroyCustomBlip(ClanBlips[thePlayer])							
ClanBlips[thePlayer] = nil	

 

Share this post


Link to post
Just now, Eficiencia said:

Passou no debugscript 3??

sim, sem erros no debugscript 3

Share this post


Link to post

bug fixed, please close the topic.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.