AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blocking team menu (https://forums.alliedmods.net/showthread.php?t=244266)

EpicKiller 07-16-2014 03:22

Blocking team menu
 
Hi! How can I block the team menu that is launched whenever a player joins? I have been thinking about this, but I don't seem to have any idea... well, not functional ones.


Thank you!


Best regards,
EpicKiller

Eagle07 07-16-2014 03:27

Re: Blocking team menu
 
PHP Code:

register_clcmd("chooseteam""block_choose"

&
PHP Code:

public block_choose(id)
{
        return 
PLUGIN_CONTINUE;


--------Or---------


PHP Code:

register_clcmd("chooseteam""block"

&
PHP Code:

public block(id)
{
    static 
CsTeams:team
    team 
cs_get_user_team(id)
    
    if (
team == CS_TEAM_SPECTATOR || team == CS_TEAM_UNASSIGNED)
        return 
PLUGIN_CONTINUE
    block_choose
(id)
    return 
PLUGIN_HANDLED;
}
public 
block_choose(id)
{
        return 
PLUGIN_CONTINUE;



EpicKiller 07-16-2014 03:45

Re: Blocking team menu
 
Quote:

Originally Posted by Eagle07 (Post 2168511)
PHP Code:

register_clcmd("chooseteam""block_choose"

&
PHP Code:

public block_choose(id)
{
        return 
PLUGIN_CONTINUE;


--------Or---------


PHP Code:

register_clcmd("chooseteam""block"

&
PHP Code:

public block(id)
{
    static 
CsTeams:team
    team 
cs_get_user_team(id)
    
    if (
team == CS_TEAM_SPECTATOR || team == CS_TEAM_UNASSIGNED)
        return 
PLUGIN_CONTINUE
    block_choose
(id)
    return 
PLUGIN_HANDLED;
}
public 
block_choose(id)
{
        return 
PLUGIN_CONTINUE;



Great, thanks! Your help is greatly appreciated!

HamletEagle 07-16-2014 04:39

Re: Blocking team menu
 
Add jointeam command, is the same as chooseteam ( almost ).


All times are GMT -4. The time now is 13:04.

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