Jump to content

Start a resource at a specific game hour - QUESTION


xXNemesiSXx

Recommended Posts

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 :D

i'm a noob in scripting and i don't know how to do this.. :D

Link to comment

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

Use my small script - Calendar Events. It triggers next events:

onMinutePass

onHourPass

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

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...