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:
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: