Raised This Month: $ Target: $400
 0% 

Block console commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-02-2010 , 12:38   Re: Block console commands
Reply With Quote #1

If you want to always block :

PHP Code:
#include <amxmodx>

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("block jointeam"VERSION"ConnorMcLeod")

    
register_clcmd("jointeam 2""BlockJoinTeam")
    
register_clcmd("jointeam 5""BlockJoinTeam")
}

public 
BlockJoinTeam()
{
    return 
PLUGIN_HANDLED


If you want to allow primo joiners :

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

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("block jointeam"VERSION"ConnorMcLeod")

    
register_clcmd("jointeam 2""BlockJoinTeam")
    
register_clcmd("jointeam 5""BlockJoinTeam")
}

public 
BlockJoinTeam(id)
{
    return !(
cs_get_user_team(id) == CS_TEAM_UNASSIGNED)



If you want to allow jointeam from all kind of spectators :

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

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("block jointeam"VERSION"ConnorMcLeod")

    
register_clcmd("jointeam 2""BlockJoinTeam")
    
register_clcmd("jointeam 5""BlockJoinTeam")
}

public 
BlockJoinTeam(id)
{
    new 
CsTeams:iTeam cs_get_user_team(id)
    return !(
iTeam == CS_TEAM_UNASSIGNED || iTeam == CS_TEAM_SPECTATOR)


Note that old style menus don't send jointeam command.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 00:09.


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