Posts: 76
Threads: 12
Joined: Feb 2012
Reputation:
0
04-17-2012, 07:55
(This post was last modified: 04-17-2012, 07:56 by Dumas .)
(04-09-2012, 10:23) OzonE Wrote: just add this code on the Hexman's Source , and Compile It , No big deal.
Thats right?
Code:
using System;
using System.Collections.Generic;
using Addon;
namespace plugin_test
{
public class plugin_test : CPlugin
}
public override void OnMapChange()
servercommand("fast_restart");
}
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\"")
}
}
}
}
Posts: 338
Threads: 19
Joined: Jan 2012
Reputation:
32
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");
}
Posts: 76
Threads: 12
Joined: Feb 2012
Reputation:
0
04-18-2012, 00:19
(This post was last modified: 04-18-2012, 02:25 by Dumas .)
EDIT:
SOLVED
Work Perfectly now for me, thank you Hexman for the plugin and OzonE for the great help.
Posts: 18
Threads: 4
Joined: Mar 2012
Reputation:
-2
it work good but i want to disable the cursor and some other shits of softcore plz answer me
Posts: 6
Threads: 1
Joined: Apr 2012
Reputation:
0
I cant compile because of this error!
Error 1 'plugin_test.plugin_test.OnFastRestart()': no suitable method found to override
Whats problem?
Posts: 338
Threads: 19
Joined: Jan 2012
Reputation:
32
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\"");
}
}
}
}
DLL File Attached Now
EDIT : add me +rep
Attached Files
SemiHC.zip (Size: 2.16 KB / Downloads: 99)
Posts: 18
Threads: 4
Joined: Mar 2012
Reputation:
-2
Posts: 338
Threads: 19
Joined: Jan 2012
Reputation:
32
Posts: 18
Threads: 4
Joined: Mar 2012
Reputation:
-2
Posts: 9
Threads: 1
Joined: Feb 2012
Reputation:
0
(04-24-2012, 09:07) OzonE Wrote: 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\"");
}
}
}
}
DLL File Attached Now
This is doing EXACTLY want I wanted, thank you very much. Finally no more typing fast_respawn on server console.......