AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Simple Restart Round (https://forums.alliedmods.net/showthread.php?t=263206)

Nightcs 05-20-2015 18:03

Simple Restart Round
 
2 Attachment(s)
This plugins and simple and very useful for mix servers to restart the match

command: !rr

no need to add any cvar

To install:
Click on the "Get Plugin" button below and download the .smx to addons/sourcemod/plugins/
Click on the "Get Source" button below and download the .sp to addons/sourcemod/scripting/

SaBaToN 05-21-2015 06:03

Re: [CSS/CSGO] Simple Restart Round
 
#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.")
}


public Action:Command_rr(client, args)
{
if (args < 1)
{
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);
return Plugin_Handled;
}

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;
}

Nightcs 05-21-2015 15:08

Re: [CSS/CSGO] Simple Restart Round
 
the plugins your sabaton not worked

SaBaToN 05-21-2015 17:48

Re: [CSS/CSGO] Simple Restart Round
 
man i tested this in my server & its work :)

shanapu 05-21-2015 19:50

Re: [CSS/CSGO] Simple Restart Round
 
Quote:

Originally Posted by Nightcs (Post 2299394)
the plugins your sabaton not worked

Quote:

Originally Posted by SaBaToN (Post 2299442)
man i tested this in my server & its work :)

have tested it out of curiosity...
... is true, doesnt work. Doesnt restart, no timer... just show who did rr whitout sec.

EDIT: should read the code next time before "testing"
it doesnt work like Nightcs version (command: !rr)
BUT
Work with Command and value! !rr 5 restart in 5sec...

SaBaToN 06-02-2015 07:49

Re: [CSS/CSGO] Simple Restart Round
 
Quote:

Originally Posted by shanapu (Post 2299459)
have tested it out of curiosity...
... is true, doesnt work. Doesnt restart, no timer... just show who did rr whitout sec.

EDIT: should read the code next time before "testing"
it doesnt work like Nightcs version (command: !rr)
BUT
Work with Command and value! !rr 5 restart in 5sec...

ohhh thx you fixed

shavit 06-02-2015 08:01

Re: [CSS/CSGO] Simple Restart Round
 
Quote:

Originally Posted by SaBaToN (Post 2299228)
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.

SaBaToN 06-09-2015 11:47

Re: [CSS/CSGO] Simple Restart Round
 
Quote:

Originally Posted by shavit (Post 2303899)
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.

I'm very sorry it was not me I account so the person who wrote this code written nonsense let me fix it

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.")
}


public Action:Command_rr(client, args)
{
        if (args < 1)
        {
                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);
                return Plugin_Handled;
        }
       
        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;
}


thekuzu 09-09-2016 17:47

Re: Simple Restart Round
 
plugin.sp(33) : error 030: compound statement not closed at the end of file (started at line 19)

1 Error.


All times are GMT -4. The time now is 08:47.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.