Raised This Month: $ Target: $400
 0% 

Force Join Team (Humans & Bots)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Apollyon
SourceMod Donor
Join Date: Dec 2007
Location: California
Old 10-26-2009 , 13:37   Re: Hard Code Server cvars
Reply With Quote #3

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
 



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