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

[SNIPPET] sm_forcertv - Edit of rockthevote.sp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 10-24-2008 , 07:20   [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #1

This small code snippet allows an admin to force a rockthevote.

Useful when you need 1 more player to type rtv.

Manual guide:
1: Open rockthevote.sp

2: Find:
Code:
RegAdminCmd("sm_rtv_addmap", Command_Addmap, ADMFLAG_CHANGEMAP, "sm_rtv_addmap <mapname> - Forces a map to be on the RTV, and lowers the allowed nominations.");
3: Add this code after that line:
Code:
RegAdminCmd("sm_forcertv", Command_ForceRTV, ADMFLAG_CHANGEMAP, "sm_forcertv - Forces RTV to start");
4: Find:
Code:
public Action:Command_Addmap(client, args)
5: Add this code before that line:
Code:
public Action:Command_ForceRTV(client, args)
{
	new String:clientName[32];
	GetClientName(client, clientName, 31);
	PrintToChatAll("[SM] %s forced an RTV vote",clientName);
	CreateTimer(2.0, Timer_StartRTV, TIMER_FLAG_NO_MAPCHANGE);
}
6: Save and compile

Premade .sp file:
Attached Files
File Type: sp Get Plugin or Get Source (rockthevote.sp - 828 views - 14.2 KB)
__________________

Last edited by DataMatrix; 11-17-2008 at 10:29.
DataMatrix is offline
Send a message via MSN to DataMatrix
Jamster
Veteran Member
Join Date: Jun 2008
Old 10-25-2008 , 18:42   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #2

Great addition.
Jamster is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 11-01-2008 , 13:59   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #3

There is a typo in the premade .sp file:

RegAdminCmd("sv_forcertv", Command_ForceRTV, ADMFLAG_CHANGEMAP, "sm_forcertv - Forces RTV to start");

Great addition tho
Chris-_- is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 11-10-2008 , 09:56   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #4

Forced democracy This reminds me of real life...
__________________
LocutusH is offline
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 11-17-2008 , 10:29   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #5

Quote:
Originally Posted by Chris-_- View Post
There is a typo in the premade .sp file:

RegAdminCmd("sv_forcertv", Command_ForceRTV, ADMFLAG_CHANGEMAP, "sm_forcertv - Forces RTV to start");

Great addition tho
Fixed
__________________
DataMatrix is offline
Send a message via MSN to DataMatrix
Jamster
Veteran Member
Join Date: Jun 2008
Old 01-04-2009 , 19:29   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #6

By the way if anyone wants this to work with SM 1.1 rtv then replace:

Code:
public Action:Command_ForceRTV(client, args)
{
	new String:clientName[32];
	GetClientName(client, clientName, 31);
	PrintToChatAll("[SM] %s forced an RTV vote",clientName);
	CreateTimer(2.0, Timer_StartRTV, TIMER_FLAG_NO_MAPCHANGE);
}
with

Code:
public Action:Command_ForceRTV(client, args)
{
	new String:clientName[32];
	GetClientName(client, clientName, 31);
	PrintToChatAll("[SM] %s forced an RTV vote",clientName);
	StartRTV();
}
The rest is the same, just make sure the admin command is in the OnPluginStart section and the above is after the client connect/disconnect stuff or whatever, its exact position doesn't matter too much.
Jamster is offline
Ratboy601
Junior Member
Join Date: Jan 2009
Old 01-08-2009 , 18:54   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #7

Nice! Is there any way to set rockthevote so that map changes don't take place until the end of the round?

Ratboy601 is offline
Jamster
Veteran Member
Join Date: Jun 2008
Old 01-08-2009 , 19:29   Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
Reply With Quote #8

sm_rtv_changetime 1
in your rtv.cfg, you need the latest release to do that though (SM 1.1)
Jamster is offline
Reply


Thread Tools
Display Modes

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 12:42.


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