Thread: [Solved] End Round plugin help needed
View Single Post
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 09-25-2020 , 02:03   Re: End Round plugin help needed
Reply With Quote #2

I don't run a Counter Strike server so I didn't test the terminate round code found on a post by XHeadHunterX.

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo 
{
    
name "EndRound",
    
author "FAQU",
    
description "Ends the current round with a draw",
    
version "0.2"
}

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_endround"EndRoundADMFLAG_GENERIC"End the current round with a draw");
    
RegAdminCmd("sm_er"EndRoundADMFLAG_GENERIC"End the current round with a draw");
}


public 
Action EndRound(int clientint args)
{

    if (
args 0)
    {
        
ReplyToCommand(client"[SM] Usage: sm_endround");
        return 
Plugin_Handled;
    }

    
CS_TerminateRound(GetConVarFloat(FindConVar("mp_round_restart_delay")), CSRoundEnd_Drawtrue);
    return 
Plugin_Handled;

PC Gamer is offline