Javier Posted January 9, 2013 Posted January 9, 2013 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
GTX Posted January 9, 2013 Posted January 9, 2013 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) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
Javier Posted January 9, 2013 Author Posted January 9, 2013 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
AhmadQTR Posted January 9, 2013 Posted January 9, 2013 What dosen't work exactly? Nobody is perfect , I'm nobody. Skype : ahmad.nasser37
Javier Posted January 9, 2013 Author Posted January 9, 2013 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)
MR.S3D Posted January 9, 2013 Posted January 9, 2013 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 Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
Castillo Posted January 9, 2013 Posted January 9, 2013 Would be better if the timer was of 1 second, not half. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TAPL Posted January 9, 2013 Posted January 9, 2013 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 )
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