Raised This Month: $ Target: $400
 0% 

Eventscripts and timeleft question...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BEANBAg
Junior Member
Join Date: Jun 2005
Location: In a prison cell.
Old 06-20-2005 , 03:57   Eventscripts and timeleft question...
Reply With Quote #1

This may be posted allready somewhere in here, but I was wondering, how would I fine out how much time is left for the map, using eventscripts?
__________________
BEANBAg is offline
Send a message via Yahoo to BEANBAg
ajax
Veteran Member
Join Date: Jan 2005
Old 06-20-2005 , 04:46  
Reply With Quote #2

this hasn't really been done with eventscripts (here) since the admin plugins feature it already. it is possible, but it is subject to breaking if the map is restarted or if the map is extended.

with all that in mind, do you still want this made for you using eventscripts? or do you just want an explanation of how it would be done?
ajax is offline
BEANBAg
Junior Member
Join Date: Jun 2005
Location: In a prison cell.
Old 06-20-2005 , 05:04  
Reply With Quote #3

Well.... How about I explain what I need it for? I found some sounds I want to have played at certain time remaining. I would think the code would be like:

Code:
if(sever_var(XXXXX) equalto 10) then nm_play #all location/to/sound/file.wav
if(sever_var(XXXXX) equalto 5) then nm_play #all location/to/sound/file.wav
if(sever_var(XXXXX) equalto 1) then nm_play #all location/to/sound/file.wav
// ...and on down to 15 seconds
What I need to do is find out what "XXXXX" is, and it doesn't exsist...
__________________
BEANBAg is offline
Send a message via Yahoo to BEANBAg
ajax
Veteran Member
Join Date: Jan 2005
Old 06-20-2005 , 11:55  
Reply With Quote #4

i see. i think that's already been covered in <this thread>

Code:
// in server.cfg
// FOR A 10 MINUTE WARNING 
es_setinfo TIMECHECK server_var(mp_timelimit) 
es_math TIMECHECK * 60 
es_math TIMECHECK - 600 
es_delayed server_var(TIMECHECK) ma_play <INSERT SOUND HERE>
this isn't entirely accurate if there is any time lapse between the map being loaded and the game starting (waiting for players). maybe i'll put together a script pack to include other time increments and to make it more accurate than this simple approach.
ajax is offline
ajax
Veteran Member
Join Date: Jan 2005
Old 06-20-2005 , 12:40  
Reply With Quote #5

see this thread for further assistance...
http://www.mattie.info/cs/forums/viewtopic.php?t=98
ajax is offline
BEANBAg
Junior Member
Join Date: Jun 2005
Location: In a prison cell.
Old 06-20-2005 , 17:49  
Reply With Quote #6

OK thanks alot for the help. For different times I would change the 60 and 600? I'm really bad at math :(

If your not busy, can you explain the numbers, or find them out for 3min, 2min, 1min, 45sec, 30sec, 15sec, and 10sec?
__________________
BEANBAg is offline
Send a message via Yahoo to BEANBAg
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode