xXNemesiSXx Posted August 13, 2012 Share Posted August 13, 2012 I have a freeroam/zombies server, it would be nice if you can help me to do a script that starts the resource called "zombies" (by slothman) at a specific game hour.. for example: at midnight it will start the resource zombies and at the sunrise it will stop it i'm a noob in scripting and i don't know how to do this.. Link to comment
xXNemesiSXx Posted August 13, 2012 Author Share Posted August 13, 2012 use: setTimer Can you write an example please? Link to comment
xXNemesiSXx Posted August 13, 2012 Author Share Posted August 13, 2012 i havent made yet any script to start a resource a specific hour, i am asking if you can make an example! (to implement in in the future or to use it now, dunno! LOL, i don't think that is a complicated script, but i'm a noob) Link to comment
manve1 Posted August 13, 2012 Share Posted August 13, 2012 Erm... this is for chatbox that is used by timer. function output() outputChatBox("text",player,255,0,255) end setTimer( output, 10000, 0 ) -- the "0" is for unlimited times, use that...the 10k is 10seconds.."output" is the function that u set timer for. it outputs the "text" every 10seconds. P.S. This script is simple and is to show how to use timer, im not making any scripts, such as zombie gameplay. Link to comment
LoveFist Posted August 13, 2012 Share Posted August 13, 2012 Use my small script - Calendar Events. It triggers next events: onMinutePassonHourPass onMonthdayPass onMonthPass onYearPass onWeekdayPass Example: addEvent ( "onHourPass", true ) function newHourCome(newHour) if newHour == 0 then outputChatBox('Midnight!') end end addEventHandler ( "onHourPass", getRootElement(), newHourCome) Link to comment
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