Quote:
Originally Posted by SaBaToN
Code:
#include <sourcemod>
public Plugin:myinfo =
{
name = "[CSGO] Restart Round",
author = "NiGhT_CSGO & Edited By SaBaToN",
description = "Restart Round",
version = "1.0"
}
public OnPluginStart()
{
RegAdminCmd("sm_rr", Command_rr, ADMFLAG_KICK, "Restarting one Match.")
RegAdminCmd("sm_rr", RR, ADMFLAG_KICK, "Restarting one Match.")
}
public Action:Command_rr(client, args)
{
new String:RRTime[32];
new String:AdminName[64];
GetCmdArgString(RRTime, sizeof(RRTime));
GetClientName(client, AdminName, sizeof(AdminName));
ServerCommand("mp_restartgame %s", RRTime);
PrintToChatAll("\x01[\x05SM\x01] \x04%s \x01proceed restart game in \x04%s \x01seconds", AdminName, RRTime);
return Plugin_Handled;
}
public Action:RR(client, args)
{
new String:AdminName[64];
GetClientName(client, AdminName, sizeof(AdminName));
ServerCommand("mp_restartgame 1");
PrintToChatAll("\x01[\x05SM\x01] \x04%s \x01proceed restart game in \x041 \x01second", AdminName);
}
I improved your plugin
now the plugin print a message who did the rr and the seconds
now all the admins can do this command and not only root
sorry for my bad english
|
We're using the new SourcePawn syntax already, use it.
Why do you trash his thread by remaking his plugin? (+your remake didn't even work)
About your remake - why do you use ServerCommand when mp_restartgame is actually a
cvar?
And, there's a whole native (Yes! A whole native just for this purpose) that
shows admin activity.
Amazing scripting skills you have there buddy, it pretty much proves that you didn't create the plugin we've talked about like.. a month ago(?) and that you banned me from your horrible community for proving it.
By the way, ADMFLAG_KICK
for a cvar change. wow. You literally copy pasted this part out of another plugin, you're supposed to return Plugin_Handled at the second command (which wasn't even necessary..) to prevent a console "unknown command" error, oh wait you've registered two commands under the same function, unnecessary.
__________________