AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Increase value by one (https://forums.alliedmods.net/showthread.php?t=155265)

killergirl 04-19-2011 15:00

Increase value by one
 
I'm trying to make a 'no-retry' plugin, but some players said they get kicked while they are connecting, or after they are connected.

PHP Code:

new g_Ready[33]

public 
client_putinserver(id)
{
    if(!
is_user_bot(id))
    {
        
g_Ready[id] += 1
        
        
new Name[32]
        
        
get_user_name(idName31)
        
        if(
g_Ready[id] > 2)
        {
            
server_cmd("kick %s"Name)
        }
    }
    
    return 
PLUGIN_HANDLED



Emp` 04-19-2011 16:35

Re: Increase value by one
 
You should use a trie to check against steam ids. What you currently do is make it so no one can join the same slot in the server.

killergirl 04-19-2011 17:48

Re: Increase value by one
 
Quote:

Originally Posted by Emp` (Post 1453750)
You should use a trie to check against steam ids. What you currently do is make it so no one can join the same slot in the server.

And where can I store the steamID's? Intro a variable, vault? Where?

Emp` 04-19-2011 18:39

Re: Increase value by one
 
Quote:

Originally Posted by Emp` (Post 1453750)
You should use a trie


Sylwester 04-19-2011 19:59

Re: Increase value by one
 
No-retry plugins that kick suck. You should block spawn and make players who use retry wait until next round. Like this: http://forums.alliedmods.net/showthread.php?p=555349


All times are GMT -4. The time now is 20:03.

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