Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
a lot of stuff
Browse files Browse the repository at this point in the history
too lazy :)
  • Loading branch information
Riccardo H committed May 22, 2019
1 parent 761d1df commit 43d7dbe
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/SurfTimer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,8 @@ char EntityList[][] = // Disable entities that often break maps
"logic_timer",
"team_round_timer",
"logic_relay",
"player_weapon_strip",
"player_weaponstrip",
};

char RadioCMDS[][] = // Disable radio commands
Expand Down
3 changes: 3 additions & 0 deletions addons/sourcemod/scripting/surftimer/commands.sp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ void CreateCommands()

// VIP Commands
RegAdminCmd("sm_fixbot", Admin_FixBot, g_VipFlag, "[surftimer] Toggles replay bots off and on");
RegAdminCmd("sm_fixbots", Admin_FixBot, g_VipFlag, "[surftimer] Toggles replay bots off and on");
RegAdminCmd("sm_fb", Admin_FixBot, g_VipFlag, "[surftimer] Toggles replay bots off and on");

RegConsoleCmd("sm_vip", Command_Vip, "[surftimer] [vip] Displays the VIP menu to client");
RegConsoleCmd("sm_mytitle", Command_PlayerTitle, "[surftimer] [vip] Displays a menu to the player showing their custom title and allowing them to change their colours");
Expand All @@ -117,6 +119,7 @@ void CreateCommands()
RegConsoleCmd("sm_textcolour", Command_SetDbTextColour, "[surftimer] [vip] VIPs can set their own custom text colour into the db");
RegConsoleCmd("sm_ve", Command_VoteExtend, "[surftimer] [vip] Vote to extend the map");
RegConsoleCmd("sm_colours", Command_ListColours, "[surftimer] Lists available colours for sm_mytitle and sm_namecolour");
RegConsoleCmd("sm_colors", Command_ListColours, "[surftimer] Lists available colours for sm_mytitle and sm_namecolour");
RegConsoleCmd("sm_toggletitle", Command_ToggleTitle, "[surftimer] [vip] VIPs can toggle their title.");
RegConsoleCmd("sm_joinmsg", Command_JoinMsg, "[surftimer] [vip] Allows a vip to set their join msg");

Expand Down
12 changes: 10 additions & 2 deletions addons/sourcemod/scripting/surftimer/surfzones.sp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ public void CreateZoneEntity(int zoneIndex)
public Action StartTouchTrigger(int caller, int activator)
{
// Ignore dead players
if (!IsValidClient(activator))
if (!IsValidClient(client)) {
return Plugin_Handled;
}
if (!IsPlayerLoaded(client)) {
return Plugin_Handled;
}

// g_bLeftZone[activator] = false;

Expand Down Expand Up @@ -246,8 +250,12 @@ public Action StartTouchTrigger(int caller, int activator)
public Action EndTouchTrigger(int caller, int activator)
{
// Ignore dead players
if (!IsValidClient(activator))
if (!IsValidClient(client)) {
return Plugin_Handled;
}
if (!IsPlayerLoaded(client)) {
return Plugin_Handled;
}

// For new speed limiter
g_bLeftZone[activator] = true;
Expand Down
10 changes: 10 additions & 0 deletions addons/sourcemod/scripting/surftimer/timer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public Action CKTimer2(Handle timer)
GetNextMap(szNextMap, 128);
// CPrintToChatAll("%t", "Timer2", g_szChatPrefix, szNextMap);
CreateTimer(1.0, TerminateRoundTimer, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
CreateTimer(10.0, ForceNextMap, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
}
}
}
Expand Down Expand Up @@ -420,6 +421,15 @@ public Action SetClanTag(Handle timer, any client)
return Plugin_Handled;
}

public Action ForceNextMap(Handle timer)
{
char szNextMap[128];
GetNextMap(szNextMap, 128);
ServerCommand("changelevel %s", szNextMap);
return Plugin_Handled;
}


public Action TerminateRoundTimer(Handle timer)
{
CS_TerminateRound(1.0, CSRoundEnd_CTWin, true);
Expand Down

0 comments on commit 43d7dbe

Please sign in to comment.