Jump to content

clima en una zona


Nicolas ECM

Recommended Posts

Hola a todos, tengo una duda, tengo echo un poco de un resource que quiero hacer pero no me sirve bien, quiero hacer que halla un clima en una zona de radar o colshape

local AreaEntry = createColRectangle (-1472.49, -1606.62, 100, 163) 
local AreaLS = createRadarArea (  -1472.49, -1606.62, 100, 163, 255, 0, 0, 255, getRootElement() ) 
  
function ENTERLS (thePlayer) 
        if (getElementType(thePlayer) == "player") then 
            if isInsideRadarArea ( AreaLS, -1472.49, -1606.62 ) then 
                outputChatBox("Usted a entrado a la zona de la niebla, cuidado hay trampas.", thePlayer, 136, 0, 190 ) 
                setWeather (9) 
            end 
        end 
    end 
  
  
addEventHandler ( "onColShapeHit", AreaEntry, ENTERLS ) 
      
function EXITLS (thePlayer)  
        if (getElementType(thePlayer) == "player") then 
            if isPedDead ( thePlayer ) ~= true then 
                        outputChatBox ("Usted a salido de la zona de la niebla", thePlayer, 136, 0, 190 ) 
                        setWeather () 
            end 
        end 
    end 
addEventHandler ( "onColShapeLeave", AreaEntry, EXITLS ) 

tengo esto hecho no se si este bien o no, se cambia el clima a todos los jugadores, como se puede hacer para que solo se le cambie a el jugador que entre? y que al salir de la zona tenga el clima que estaba antes, porfavor ayuda.

Link to comment
  
weather = nil 
function oCSH( elemento ) 
if elemento == localPlayer then 
weather = getWeather() 
setWeather(9) 
    end 
end 
addEventHandler("onClientColShapeHit",root,oCSH) 
function oCLH(elemento) 
if elemento == localPlayer then 
setWeather(weather or 0) 
weather = nil 
end 
end 
addEventHandler("onClientColShapeLeave",root,oCLH) 
  

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...