View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-30-2015 , 19:32   Re: Auto join, replace class menu properly
Reply With Quote #5

Quote:
Originally Posted by Jhob94 View Post
Well i guess that's a nice option too.
But i don't want to allow jointeam command after doing that. My idea before was to let 0 spawnpoints for Terro teams so they can't join Terro. And disable allowspectators cvar. But i need this so what about this? It can be bypassed?
PHP Code:
#include <amxmodx>

new bool:Joined[33]

public 
plugin_init()
{
    
register_clcmd("jointeam""cmdhandler")
}

public 
client_connect(id)
    
Joined[id] = false
    
public client_disconnect(id)
    
Joined[id] = false
    
public cmdhandler(id)
{
    if(!
Joined[id])
    {
        
Joined[id] = true
        
return PLUGIN_CONTINUE
    
}
    
    return 
PLUGIN_HANDLED

It looks fine to me. Why do you think there is something wrong with that method?
__________________
fysiks is offline