Raised This Month: $51 Target: $400
 12% 

Zombie Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KratosMafia
Senior Member
Join Date: Jul 2012
Old 10-06-2012 , 18:34   Zombie Timer
Reply With Quote #1

So for anyone who wants here is a script for zombie timer.
Works for CS:GO I have not tried CSS so I do not know.

Code:
 #include <sourcemod>
public Plugin:myinfo = {
name = "Zombie Timer",
author = "KratosMafia",
description = "Amount of time till zombie spawns.",
url = "Www.OpticalGaming.Net"
}

public OnPluginStart() 
{
    HookEvent("round_freeze_end", Event_RoundFreezeEnd);
}

public Action:Event_RoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadcast) 
{
    CreateTimer(0.0, ShowMsg);
}

public Action:ShowMsg(Handle:timer) 
{
    PrintCenterTextAll("Zombies will spawn in 30 seconds.");
    CreateTimer(1.0, ShowMsgRepeat, _, TIMER_REPEAT);
}

public Action:ShowMsgRepeat(Handle:timer) {
    static count = 0;

    count++;

    if(count < 30) {
        PrintCenterTextAll("Zombies will spawn in %d %s.", (30 - count), ((30 - count) == 1) ? "second" : "seconds");
        return Plugin_Continue;
    }
    else {
        count = 0;
        return Plugin_Stop;
    }
}
change all the 30's to what ever you have your zombie spawn to.

This will put an alert at the bottom of the skin showing how long till zombie spawns. It is real nice. If you do not know how to compile just ask.
__________________

Last edited by KratosMafia; 10-06-2012 at 18:36.
KratosMafia is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 10-07-2012 , 12:51   Re: Zombie Timer
Reply With Quote #2

The built-in infection countdown timer will also work (in both CS: S and CS: GO). It will display correct value even if there's a timespan.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
Jargon
SourceMod Donor
Join Date: Jun 2012
Location: Sydney, Australia
Old 10-07-2012 , 15:43   Re: Zombie Timer
Reply With Quote #3

Quote:
Originally Posted by rhelgeby View Post
The built-in infection countdown timer will also work (in both CS: S and CS: GO). It will display correct value even if there's a timespan.
Yeah this is what I've been using, clever though!
Jargon is offline
KratosMafia
Senior Member
Join Date: Jul 2012
Old 10-07-2012 , 21:25   Re: Zombie Timer
Reply With Quote #4

Quote:
Originally Posted by rhelgeby View Post
The built-in infection countdown timer will also work (in both CS: S and CS: GO). It will display correct value even if there's a timespan.
Did not know just decided to make my own ^-^
__________________
KratosMafia is offline
mentaldepth
Junior Member
Join Date: Jul 2013
Old 07-18-2013 , 04:53   Re: Zombie Timer
Reply With Quote #5

Where exactly do I add this code?
mentaldepth is offline
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 10:36.


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