Jump to content

What is the problem?


Javier

Recommended Posts

Hii friend , help me with this

function message () 
     local hour, minutes = getTime() 
         if (hour >= 20 and minutes == 30 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement()) 
     end 
end 
addEventHandler("onResourceStart", message) 
  
--- Nueva Linea 
  
function info () 
     local hour, minutes = getTime() 
         if (hour >= 6 and minutes == 0 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement()) 
     end 
end 
addEventHandler("onResourceStart", info) 
  

No it does not work, seems to be okay but i do not know. Thanks :D

Link to comment
function message () 
     local hour, minutes = getTime() 
     if (hour >= 20 and minutes == 30 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement()) 
     end 
end 
addEventHandler("onResourceStart", resourceRoot, message) 
  
--- Nueva Linea 
  
function info () 
     local hour, minutes = getTime() 
     if (hour >= 6 and minutes == 0 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement()) 
     end 
end 
addEventHandler("onResourceStart", resourceRoot, info) 

Link to comment
function message () 
     local hour, minutes = getTime() 
     if (hour >= 20 and minutes == 30 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement()) 
     end 
end 
addEventHandler("onResourceStart", resourceRoot, message) 
  
--- Nueva Linea 
  
function info () 
     local hour, minutes = getTime() 
     if (hour >= 6 and minutes == 0 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement()) 
     end 
end 
addEventHandler("onResourceStart", resourceRoot, info) 

try the client side and the server, but does not work

Link to comment
Use a timer instead of the event.

So?

function message () 
     local hour, minutes = getTime() 
     if (hour >= 20 and minutes == 30 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement()) 
     end 
end 
setTimer(message, 500, 1) 
  
  
function info () 
     local hour, minutes = getTime() 
     if (hour >= 6 and minutes == 0 ) then 
         outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement()) 
     end 
end 
setTimer(info, 500, 1) 

Link to comment
  
function message () 
    local hour, minutes = getTime() 
    if (hour >= 20 and minutes == 30 ) then 
        outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement(), 255, 0, 0 )  
    elseif (hour >= 6 and minutes == 0 ) then 
        outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement(), 255, 0, 0 )  
    end 
end 
setTimer(message, 500, 0)   --- 0 it infinite timer 
  
  

Link to comment

Don't forget to enable colorCoded.

outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement(), 255, 0, 0 ) 

outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement(), 255, 0, 0 ) 

Will be:

outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: La Noche Comenzo.", getRootElement(), 255, 0, 0, true ) 

outputChatBox("#D21D1D[Reporte #D21D1DMilitar]: Ah amanecido. #F2184BHora #F5F5FF06:00", getRootElement(), 255, 0, 0, true ) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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