Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- int g_roundStartedTime = -1;
- bool OnRound;
- int State = 0;
- float g_fMult = 1.0;
- ConVar g_hCvarMaxCTHeight;
- ConVar g_hCvarMaxTHeight;
- public Plugin myinfo =
- {
- name = "New Plugin",
- author = "Unknown",
- description = "<- Description ->",
- version = "1.0",
- url = "<- URL ->"
- }
- public void OnPluginStart()
- {
- g_hCvarMaxCTHeight = CreateConVar("sm_maxCTheight_mult", "200.0", "Max height mult");
- g_hCvarMaxTHeight = CreateConVar("sm_maxTheight", "300.0", "Max height mult");
- HookEvent("round_start", Round_Start);
- HookEvent("round_end", Round_End);
- RegConsoleCmd("sm_testtime", sm_testtime);
- }
- public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3], float angles[3], int& weapon, int& subtype, int& cmdnum, int& tickcount, int& seed, int mouse[2])
- {
- if(IsPlayerAlive(client))
- {
- if(GetClientTeam(client) == 3)
- {
- SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", g_fMult);
- if(GetEntityFlags(client) & FL_ONGROUND && buttons & IN_JUMP)
- {
- float velll[3];
- GetEntPropVector(client, Prop_Data, "m_vecVelocity", velll);
- velll[2] = g_hCvarMaxCTHeight.FloatValue * GetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue");
- TeleportEntity(client, NULL_VECTOR,NULL_VECTOR, velll);
- }
- }
- if(GetClientTeam(client) == 2)
- {
- if(GetEntityFlags(client) & FL_ONGROUND && buttons & IN_JUMP)
- {
- float velll[3];
- GetEntPropVector(client, Prop_Data, "m_vecVelocity", velll);
- velll[2] = g_hCvarMaxTHeight.FloatValue;
- TeleportEntity(client, NULL_VECTOR,NULL_VECTOR, velll);
- }
- }
- }
- }
- public Action sm_testtime(client, args)
- {
- if(OnRound)
- {
- PrintToChatAll("time remaining %i", TimeLeft());
- }
- return Plugin_Handled;
- }
- public Action Round_Start(Event event, const char[] name, bool dontBroadcast)
- {
- g_roundStartedTime = GetTime();
- OnRound = true;
- IniAll();
- }
- public Action Round_End(Event event, const char[] name, bool dontBroadcast)
- {
- OnRound = false;
- IniAll();
- }
- int TimeLeft()
- {
- return (GameRules_GetProp("m_iRoundTime") - (GetTime() - g_roundStartedTime))/60;
- }
- public void OnGameFrame()
- {
- if(10 < TimeLeft() < 12 && State == 0) ChangeCTSpeed(1.1);
- if(8 < TimeLeft() < 10 && State == 1) ChangeCTSpeed(1.2);
- if(6 < TimeLeft() < 8 && State == 2) ChangeCTSpeed(1.3);
- if(5 < TimeLeft() < 6 && State == 3) ChangeCTSpeed(1.4);
- if(4 < TimeLeft() < 5 && State == 4) ChangeCTSpeed(1.5);
- if(3 < TimeLeft() < 4 && State == 5) ChangeCTSpeed(1.6);
- if(2 < TimeLeft() < 3 && State == 6) ChangeCTSpeed(1.7);
- if(1 < TimeLeft() < 2 && State == 7) ChangeCTSpeed(1.8);
- if(0 < TimeLeft() < 1 && State == 8) ChangeCTSpeed(1.9);
- }
- void ChangeCTSpeed(float mult)
- {
- State++;
- PrintToChatAll("The speed of SEEKERS, it's now turn to %f", mult);
- g_fMult = mult;
- }
- void IniAll()
- {
- State = 0;
- g_fMult = 1.0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement