Raised This Month: $159 Target: $400
 39% 

Scripting ConVar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SoulSteel
New Member
Join Date: May 2019
Old 08-31-2019 , 12:11   Scripting ConVar
Reply With Quote #1

i wanna do a restart game command if someone can help i will be very appreciate

Last edited by SoulSteel; 08-31-2019 at 12:11.
SoulSteel is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 08-31-2019 , 23:03   Re: Scripting ConVar
Reply With Quote #2

sm_rcon mp_restartgame 1 if you have ADMFLAG_RCON. No plugin needed.
__________________
Plugin Developer for cTF2w & Creators.TF

404UNF is offline
Ilusion9
Senior Member
Join Date: Jun 2018
Location: Romania
Old 09-01-2019 , 06:08   Re: Scripting ConVar
Reply With Quote #3

Quote:
Originally Posted by 404UNF View Post
sm_rcon mp_restartgame 1 if you have ADMFLAG_RCON. No plugin needed.
or sm_cvar mp_restartgame 1
__________________
Ilusion9 is offline
qNiGHT
Junior Member
Join Date: Mar 2019
Old 09-01-2019 , 08:42   Re: Scripting ConVar
Reply With Quote #4

Quote:
Originally Posted by SoulSteel View Post
i wanna do a restart game command if someone can help i will be very appreciate
simple example
Code:
public void OnPluginStart()
{
	RegAdminCmd("sm_restart", RESTART, ADMFLAG_GENERIC);
}

public Action RESTART(client, args)
{
	ServerCommand("sm_rcon mp_restartgame 1");
}
qNiGHT is offline
I am inevitable
Member
Join Date: May 2019
Location: 0xA6DA34
Old 09-01-2019 , 14:56   Re: Scripting ConVar
Reply With Quote #5

ServerCommand is already sent using rcon, so get rid of sm_rcon.
__________________
I do make plugins upon requests, so hit me up on discord if you're interested: cucklord67xD#3823
I am inevitable is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 09-01-2019 , 21:28   Re: Scripting ConVar
Reply With Quote #6

Quote:
Originally Posted by I am inevitable View Post
ServerCommand is already sent using rcon, so get rid of sm_rcon.
You can send it via the console if you're logged into RCON, but if you aren't and don't have access to the RCON password but do have access to the sm_rcon command (lord knows why anyone would have a setup like that), then I would highly suggest using sm_rcon and not sm_cvar.

I use /rcon mp_restartgame 1 all the time on my test server and it does what it says on the tin; restarts the game.
__________________
Plugin Developer for cTF2w & Creators.TF

404UNF is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-02-2019 , 02:44   Re: Scripting ConVar
Reply With Quote #7

Quote:
Originally Posted by 404UNF View Post
-snip-
They were talking about the use of sm_rcon within ServerCommand(), which is always unnecessary.
__________________
ddhoward is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode