04-17-2012, 12:36 (This post was last modified: 04-17-2012, 12:39 by OzonE.)
Yes, Should work. But You Have add this too , according to @HeXman fastrestart has to be called when a player is connected and ingame , so you have to add this before the fast restart; it waits 60 seconds to make sure everybody is connected.
also if you dont want this , you can restart it manally.
Code:
using system.threading
public override void OnMapChange()
{
thread.Sleep(60000);
servercommand("fast_restart");
}
04-24-2012, 09:07 (This post was last modified: 04-24-2012, 16:30 by OzonE.)
Code:
Saeed Jan Ba Ejze :P
fuck it , i made one for ya.
New Version : Fast Restart After 60 Seconds
Fast restart Alert On Chat.
Game Is Now L!VE On Chat.
Because Of Open Source FTW , Here Is The Source:
Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Threading;
namespace plugin_test
{
public class plugin_test : CPlugin
{
public override void OnServerLoad()
{
ServerPrint("Semi Hardcore Plugin 2.0 By HeXman, Edited By OzonE : Loaded!");
}
public override void OnMapChange()
{
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
Thread.Sleep(60000);
ServerCommand("fast_restart");
ServerSay("Game Is Now ^2L!VE",true);
}
public override void OnFastRestart()
{
hardcore();
}
public override void OnPlayerConnect(ServerClient Client)
{
SetClientDvar(Client.ClientNum, "g_hardcore \"1\"");
SetClientDvar(Client.ClientNum, "cg_drawCrosshair \"0\"");
SetClientDvar(Client.ClientNum, "cg_scoreboardPingText \"1\"");
}
public void hardcore()
{
foreach (ServerClient client in GetClients())
{
SetClientDvar(client.ClientNum, "g_hardcore \"1\"");
SetClientDvar(client.ClientNum, "cg_drawCrosshair \"0\"");
SetClientDvar(client.ClientNum, "cg_scoreboardPingText \"1\"");
New Version : Fast Restart After 60 Seconds
Fast restart Alert On Chat.
Game Is Now L!VE On Chat.
Because Of Open Source FTW , Here Is The Source:
Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Threading;
namespace plugin_test
{
public class plugin_test : CPlugin
{
public override void OnServerLoad()
{
ServerPrint("Semi Hardcore Plugin 2.0 By HeXman, Edited By OzonE : Loaded!");
}
public override void OnMapChange()
{
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
ServerSay("^1Warm Up! ^2Fast Restart In ^360 ^2Seconds!",true);
Thread.Sleep(60000);
ServerCommand("fast_restart");
ServerSay("Game Is Now ^2L!VE",true);
}
public override void OnFastRestart()
{
hardcore();
}
public override void OnPlayerConnect(ServerClient Client)
{
SetClientDvar(Client.ClientNum, "g_hardcore \"1\"");
SetClientDvar(Client.ClientNum, "cg_drawCrosshair \"0\"");
SetClientDvar(Client.ClientNum, "cg_scoreboardPingText \"1\"");
}
public void hardcore()
{
foreach (ServerClient client in GetClients())
{
SetClientDvar(client.ClientNum, "g_hardcore \"1\"");
SetClientDvar(client.ClientNum, "cg_drawCrosshair \"0\"");
SetClientDvar(client.ClientNum, "cg_scoreboardPingText \"1\"");
}
}
}
}
DLL File Attached Now
This is doing EXACTLY want I wanted, thank you very much. Finally no more typing fast_respawn on server console.......