Raised This Month: $ Target: $400
 0% 

Force Join Team (Humans & Bots)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-26-2009 , 04:37   Re: Hard Code Server cvars
Reply With Quote #1

Add it to amxx.cfg :/
__________________
xPaw is offline
Apollyon
SourceMod Donor
Join Date: Dec 2007
Location: California
Old 10-26-2009 , 13:37   Re: Hard Code Server cvars
Reply With Quote #2

This code works. The problem is, just like when it's used and changed in a .cfg file, a mapchange is required for the changes to take effect.

Is there a way to code a plugin to force the teams, as done with these cvars, while using an "sv_restart 1" command instead of a mapchange? I would like to be able to use this code in 2 separate plugins, with the teams reversed, along with this Multimod plugin.

PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
plugin_cfg() {
    
set_cvar_string"humans_join_team""t" )
    
set_cvar_string"bot_join_team""ct" )

__________________

Last edited by Apollyon; 10-26-2009 at 13:47.
Apollyon is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-26-2009 , 15:30   Re: Hard Code Server cvars
Reply With Quote #3

PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
plugin_precache() {
    
set_cvar_string"humans_join_team""t" )
    
set_cvar_string"bot_join_team""ct" )
    
set_cvar_num"sv_restart")

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 17:37.


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