Thread: [Solved] End Round plugin help needed
View Single Post
Author Message
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 09-25-2020 , 00:23   End Round plugin help needed
Reply With Quote #1

I started working on a small endround plugin, however I wanted it to use the "mp_round_restart_delay" value as the delay amount for CS_TerminateRound.
I'm a complete noob when it comes to scripting, and I can't seem to figure out what I did wrong on my own. If anyone could help me, it'll be highly appreciated.

(Argument type mismatch on line 31; Tag mismatch on lines 31 and 32)

This is what I did so far :
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.1"
};

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;
    }
    
    
Handle hDelay GetConVarFloat("mp_round_restart_delay");
    
CS_TerminateRound(hDelayCSRoundEnd_Drawtrue);
    return 
Plugin_Handled;

Sorry for my bad english.

Last edited by FAQU; 09-25-2020 at 09:11.
FAQU is offline