createMissionTimer ( duration, countdown, format, x, y, bg, font, scale, r, g, b )
الارقمنتات :
duration - The time in milliseconds
countdown - A bool of whether to countdown or count up. Setting it to true will count down from the duration, setting it to false will count up to the duration (latter isnt tested yet)
format - A string detailing the format of the timer text to be shown. You can chose whether to show minutes, seconds or centiseconds using these 3 strings:
%m - minutes
%s - seconds
%cs - centiseconds
This allows you to add normal text onto the timer as well as showing the time left (eg: "Time left: %m:%s")
x,y - Position on the screen, this uses "smart positioning". It can be relative or absolute - the deathmatch gamemode creates it at 0.5,20. This means the x value is in the centre, the y is 20pixels from the top. If you specify a negative value it draws the other way, i.e. -20 would be 20pixels from the bottom rather than the top. The same can be done for x.
bg - Whether to draw the default rounded-rectangle behind the timer. Setting this to false will hide it
font - The font of the timer. Looks best in default-bold
scale - The size of the text/bg.
r,g,b - The red/green/blue components to make up the colour of the timer text (defaults to white)
There are also some other exported functions that you may or may not need:
setMissionTimerTime ( missionTimer, time )
Sets the countdown/countup target time (in milliseconds)
getMissionTimerTime ( missionTimer )
Gets the number currently showing on the clock (in milliseconds)
setMissionTimerFrozen ( missionTimer, frozen )
Sets the timer to frozen (true) or normal (false)
isMissionTimerFrozen ( missionTimer )
See if the timer is frozen
setMissionTimerHurryTime ( missionTimer, time )
Set the time that the clock will turn red (in milliseconds) (ie: to indicate there is not much time left)
setMissionTimerFormat ( missionTimer, format )
Set the text format for the timer