Raised This Month: $ Target: $400
 0% 

Player is selecting a class


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Schwabba
Senior Member
Join Date: Apr 2008
Old 10-22-2010 , 05:45   Player is selecting a class
Reply With Quote #1

Got a better question:

How i can make that a player is automatically joined CT and a class?

Last edited by Schwabba; 10-22-2010 at 05:56.
Schwabba is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 10-22-2010 , 06:30   Re: Player is selecting a class
Reply With Quote #2

Try this:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

}

public 
client_putinserver(id)
{
    
cs_set_user_team(idCS_TEAM_CT)

dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Schwabba
Senior Member
Join Date: Apr 2008
Old 10-22-2010 , 06:40   Re: Player is selecting a class
Reply With Quote #3

Nope, it makes the server crash, but..

PHP Code:
    register_clcmd("chooseteam""ClientChange"
PHP Code:
public ClientChange (id)
{
    
cs_set_user_team(idCS_TEAM_CT)
    return 
PLUGIN_HANDLED;

doesn't work too, because you get teleported to the cameras with it.


EDIT:

I found it out:

PHP Code:
public plugin_init()
{
    
server_cmd"humans_join_team CT" );
    
register_message(get_user_msgid("ShowMenu"), "autojoin")
    
register_message(get_user_msgid("VGUIMenu"), "autojoin")
}

public 
autojoin(msgiddestid)
{
    
client_cmd(id"joinclass"2)
    return 
PLUGIN_HANDLED


Last edited by Schwabba; 10-22-2010 at 07:46.
Schwabba 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 10:15.


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