JimmyCarter
03-22-2003, 01:53 AM
I'm guessing something that will run only on Events.cs (as an independent script and not part of a pack) and not require all that presto hooplah. Random and others, I know you have z0dd stuffs. PLEASE.
Help - z0dd compatible ClockHUDJimmyCarter 03-22-2003, 01:53 AM I'm guessing something that will run only on Events.cs (as an independent script and not part of a pack) and not require all that presto hooplah. Random and others, I know you have z0dd stuffs. PLEASE. Hilikus 03-22-2003, 02:22 AM $Clock_HUD_FearGuiMenu = "False"; $Clock_HUD[X] = "590"; $Clock_HUD[Y] = "407"; $Clock_HUD[U] = "40"; $Clock_HUD[V] = "18"; function Clock_HUD_Create() { $Clock_HUD = newObject("Clock_HUD", SimGui::Control, $Clock_HUD[X], $Clock_HUD[Y], $Clock_HUD[U], $Clock_HUD[V]); if($Clock_HUD_FearGuiMenu ) $Clock_HUD_Border = newObject("Clock_HUD_Border", FearGui::FearGuiMenu, 0, 0, $Clock_HUD[U], $Clock_HUD[V]); $Clock_HUD_Text = newObject("Clock_HUD_Text", FearGuiFormattedText, 4, 0, $Clock_HUD[U], $Clock_HUD[V]); if($Clock_HUD_FearGuiMenu ) { addtoset("Clock_HUD_Border", "Clock_HUD_Text" ); addtoset("Clock_HUD", "Clock_HUD_Border" ); } else { addtoset("Clock_HUD", "Clock_HUD_Text" ); } addtoset("PlayGui", "Clock_HUD" ); } Event::Attach(eventPlayGu iCreated, Clock_HUD_Create); function Clock_HUD_Destroy() { removeFromSet("PlayGui", $Clock_HUD); deleteObject($Clock_HUD); } Event::Attach(eventExit, Clock_HUD_Destroy); function remoteSetTime(%s, %t) { if (%s == 2048) { setHudTimer(%t); Event::Trigger(eventUpdat eTime, Time::GetMinutes((%t+1) * -1), Time::GetSeconds((%t+1) * -1)); } } function ClockHud::Update(%min, %sec) { $ClockHud::Min = %min % 60; $clockHud::Sec = %sec; $ClockHud::CountingDown = true; schedule::Add("ClockHud::Iterate();", 1); updateClockHud(); } Event::Attach(eventUpdate Time, ClockHud::Update); function ClockHud::SetReverse(%cli ent, %msg) { if ((!%client) && (%msg == "Match started." )) { $ClockHud::Min = $clockHud::Sec = 0; $ClockHud::CountingDown = false; } } Event::Attach(eventClient Message, ClockHud::SetReverse); function LZero(%number) { if (%number < 10) return "0" @ %number; else return %number; } function updateClockHud() { Control::setValue("Clock_HUD_Text", "<f2>" @ LZero($ClockHud::Min) @ ":" @ LZero($ClockHud::Sec)); } function ClockHud::Iterate() { if ($ClockHud::CountingDown) { if ($ClockHud::Sec > 0) { $ClockHud::Sec--; } else { $ClockHud::Sec = 59; if ($ClockHud::Min > 0) { $ClockHud::Min--; } } } else { if ($ClockHud::Sec < 59) { $ClockHud::Sec++; } else { $ClockHud::Sec = 0; if ($ClockHud::Min < 59) { $ClockHud::Min++; } } } schedule::add("ClockHud::Iterate();", 1); updateClockHud(); } function ClockHud::Init() { $ClockHud::Min = $clockHud::Sec = 0; schedule::add("ClockHud::Iterate();", 1); updateClockHud(); } Event::Attach(eventConnec ted, ClockHud::Init); function Schedule::Add(%eval, %time, %tag) { if(%tag == "" ) %tag = %eval; $Schedule::ID[%tag]++; $Schedule::eval[%tag] = %eval; schedule("Schedule::Exec(\""@escapestring(%tag)@"\", "@$Schedule::ID[%tag]@" );", %time); } function Schedule::Exec(%tag, %id) { if($Schedule::ID[%tag] != %id) return; %eval = $Schedule::eval[%tag]; Schedule::Cancel(%tag); eval(%eval); } function Schedule::Cancel(%tag) { $Schedule::ID[%tag]++; $Schedule::eval[%tag] = ""; } JimmyCarter 03-22-2003, 02:56 AM can anyone figure out why that coding ^ won't work? R@ND0M 03-22-2003, 11:42 AM I haven't messed w/ z0dd for a few months now. But it's not going to be very easy. From what I just looked at then, it's going to be more than a 10 second job. Maybe you could upload your z0ddhud (that's customized for you) and myself or somebody else could port it. I'm a shitty scripter though, so maybe somebody like Andrew or Brain^Virus could mess w/ it if they have time (even though they both hate z0ddhud :P) edit: It won't work because he hasn't changed anything from the regular one :P JimmyCarter 03-22-2003, 11:50 AM Ok. Thanks Random. Here (http://www.jcbennett.net/files/z0dd_hud.cs) is my z0dd_hud file. I can link my autoexec if you need to see what else I'm running. ;x Thanks. JimmyCarter 03-23-2003, 01:03 PM Here's why i would like this - to get rid of the annoying default. http://www.jcbennett.net/images/newconfig.jpg R@ND0M 03-23-2003, 01:32 PM looking good.. i'm about to go to sleep now (all nighter), I'll see if I have time when I wake up JimmyCarter 03-23-2003, 03:02 PM I do appreciate it sir. Sleep well. cyclonite 03-23-2003, 11:58 PM Wouldn't you just need to run the Presto Schedule functions and maybe events? I know nothing about z0dd tho :S JimmyCarter 03-24-2003, 12:26 AM that's what i thought, so i included presto's event.cs and events.cs as well as writer's full events.cs and it still didn't work :( R@ND0M 03-25-2003, 10:46 AM Yo. (http://www.team5150.com/~random/scriptz/Octoberz0dd_hud.cs) JimmyCarter 03-25-2003, 11:35 AM Oh man. Thanks a lot. :D edit: counts by twos :x how'd you manage that :) | ||