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", EndRound, ADMFLAG_GENERIC, "End the current round with a draw");
RegAdminCmd("sm_er", EndRound, ADMFLAG_GENERIC, "End the current round with a draw");
}
public Action EndRound(int client, int args)
{
if (args > 0)
{
ReplyToCommand(client, "[SM] Usage: sm_endround");
return Plugin_Handled;
}
Handle hDelay = GetConVarFloat("mp_round_restart_delay");
CS_TerminateRound(hDelay, CSRoundEnd_Draw, true);
return Plugin_Handled;
}
Sorry for my bad english.