PDA

View Full Version : [SNIPPET] sm_forcertv - Edit of rockthevote.sp


DataMatrix
10-24-2008, 07:20
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:
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:
RegAdminCmd("sm_forcertv", Command_ForceRTV, ADMFLAG_CHANGEMAP, "sm_forcertv - Forces RTV to start");

4: Find:
public Action:Command_Addmap(client, args)

5: Add this code before that line:
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:

Jamster
10-25-2008, 18:42
Great addition.

Chris-_-
11-01-2008, 13:59
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 :mrgreen:

LocutusH
11-10-2008, 09:56
Forced democracy :D This reminds me of real life...

DataMatrix
11-17-2008, 10:29
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 :mrgreen:

Fixed :)

Jamster
01-04-2009, 19:29
By the way if anyone wants this to work with SM 1.1 rtv then replace:

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

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.

Ratboy601
01-08-2009, 18:54
Nice! Is there any way to set rockthevote so that map changes don't take place until the end of the round?

http://module.game-monitor.com/8.9.9.142:27015/image/default/default.png (http://www.game-monitor.com/zps2_GameServer/8.9.9.142:27015/Ratboys_A_P_O_C_A_L_Y_P_S_E_247_objectives_on ly.html)

Jamster
01-08-2009, 19:29
sm_rtv_changetime 1
in your rtv.cfg, you need the latest release to do that though (SM 1.1)