just pushed
This commit is contained in:
parent
f174a8a5b1
commit
9bdaa4f383
18
set_tickrate_nextmap/scripting/maps_66_tick.txt
Normal file
18
set_tickrate_nextmap/scripting/maps_66_tick.txt
Normal file
@ -0,0 +1,18 @@
|
||||
ze_collective_css5
|
||||
ze_diddle_v3_css2
|
||||
ze_tloz_celestia_a4
|
||||
ze_scp_v4
|
||||
ze_ocarina_of_time_v1_0
|
||||
ze_scp_v3
|
||||
ze_discount_v1_2
|
||||
ze_castlevania_v1_3
|
||||
ze_doom3_v1
|
||||
ze_harry_potter_v2_1
|
||||
ze_last_man_standing_v6_1
|
||||
ze_lotr_minas_tirith_v3_3
|
||||
ze_mkzk_scarab_v4
|
||||
ze_ouroboros_v2
|
||||
ze_ouroboros_v3
|
||||
ze_randomizer_c1s4
|
||||
ze_rev_s2
|
||||
ze_best_korea_css3
|
46
set_tickrate_nextmap/scripting/set_tickrate_for_nextmap.sp
Normal file
46
set_tickrate_nextmap/scripting/set_tickrate_for_nextmap.sp
Normal file
@ -0,0 +1,46 @@
|
||||
#pragma semicolon 1
|
||||
#define PLUGIN_AUTHOR "jenz"
|
||||
#define PLUGIN_VERSION "1.0"
|
||||
|
||||
#include <sourcemod>
|
||||
#include <mapchooser_extended>
|
||||
|
||||
//https://github.com/Mikusch/SM-TickrateChanger/tree/main
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "tickrate_command_caller",
|
||||
author = PLUGIN_AUTHOR,
|
||||
description = "set tickrate based on what nextmap is",
|
||||
version = PLUGIN_VERSION,
|
||||
url = "www.unloze.com"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
||||
public void OnMapVoteEnd(const char[] map)
|
||||
{
|
||||
new Handle:fileHandle = OpenFile("maps_66_tick.txt", "r" );
|
||||
char lineBuffer[256];
|
||||
bool changeTick = false;
|
||||
while(!IsEndOfFile(fileHandle) && ReadFileLine(fileHandle, lineBuffer, sizeof(lineBuffer)))
|
||||
{
|
||||
TrimString(lineBuffer);
|
||||
if (StrEqual(map, lineBuffer, false))
|
||||
{
|
||||
changeTick = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
CloseHandle(fileHandle);
|
||||
if (changeTick)
|
||||
{
|
||||
ServerCommand("sm_tickrate 66");
|
||||
}
|
||||
else
|
||||
{
|
||||
ServerCommand("sm_tickrate 100");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user