Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #define WHITE 0x01
- #define DARKRED 0x02
- #define VERSION "1.0"
- public Plugin:myinfo =
- {
- name = "MapchangeForcer",
- author = "1NutWunDeR",
- description = "Maps won't change if mp_ignore_round_win_conditions is set to 1. This plugin forces a round/map end and allows weapon drops!",
- version = VERSION,
- url = ""
- };
- public OnMapStart()
- {
- CreateTimer(1.0, CheckRemainingTime, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
- }
- public Action:CheckRemainingTime(Handle:timer)
- {
- new timeleft;
- GetMapTimeLeft(timeleft);
- if (timeleft==0)
- {
- ServerCommand("mp_ignore_round_win_conditions 0");
- for(new i = 1; i <= MaxClients; i++)
- {
- if(IsValidClient(i, true) && !IsFakeClient(i))
- {
- ForcePlayerSuicide(i);
- }
- }
- }
- }
- stock bool:IsValidClient(client, bool:bAlive = false)
- {
- if(client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (bAlive == false || IsPlayerAlive(client)))
- {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement