AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [SNIPPET] sm_forcertv - Edit of rockthevote.sp (https://forums.alliedmods.net/showthread.php?t=79475)

DataMatrix 10-24-2008 07:20

[SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
1 Attachment(s)
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:

Jamster 10-25-2008 18:42

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
Great addition.

Chris-_- 11-01-2008 13:59

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
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

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
Forced democracy :D This reminds me of real life...

DataMatrix 11-17-2008 10:29

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
Quote:

Originally Posted by Chris-_- (Post 708464)
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

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
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.

Ratboy601 01-08-2009 18:54

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
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...lt/default.png

Jamster 01-08-2009 19:29

Re: [SNIPPET] sm_forcertv - Edit of rockthevote.sp
 
sm_rtv_changetime 1
in your rtv.cfg, you need the latest release to do that though (SM 1.1)


All times are GMT -4. The time now is 01:50.

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