Raised This Month: $ Target: $400
 0% 

If you don't type .rdy in 2 minutes, you get kicked.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-13-2011 , 15:32   Re: If you don't type .rdy in 2 minutes, you get kicked.
Reply With Quote #4

PHP Code:
public client_connect(id)
{
    new 
playername[32]
    
    
get_user_name(idplayername31)
    
    new 
pug fopen(pug_ini_file"r")
    
    
fseek(pug, -1SEEK_END)
    
getchar fgetc(pug)
    
    if (
getchar == '0')
    {
    
        
client_print(idprint_chat"%s Please type .rdy to be Ready! You will be kicked in %d seconds if you don't type it."PREFIXtimeleft)
        
timeleft -= 30
        set_task
(30.0"Continue")
        
    }
    
    else
    {
        
client_print(idprint_chat"%s You have entered to this match as it has already started, you will be used as a substitution."PREFIX)
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_HANDLED
}

public Continue(
id)
{
    
    new 
playersteam[30]
    
get_user_authid(idplayersteam29)
    
    for (new 
kk<typedalrdycounter k++)
    {
        if (
equali(playersteamtypedalrdy[k]))
        {
            return 
PLUGIN_HANDLED;
        }
        
        else
        {
            continue;
        }
    }
    new 
playername[32]
    
    
get_user_name(idplayername31)
    
    
client_print(idprint_chat"%s Please type .rdy to be Ready! You will be kicked in %d seconds if you don't type it."PREFIXtimeleft)
    switch(
timeleft)
    {
        case 
90:
        {
            
timeleft -= 30
            set_task
(30.0"Continue")
        }
        
        case 
60:
        {
            
timeleft -= 30
            set_task
(30.0"Continue")
        }
        
        case 
30:
        {
            
timeleft -= 20
            set_task
(20.0"Continue")
        }
        
        case 
10:
        {
            
timeleft 0
            set_task
(10.0"Continue")
        }
        
        case 
0:
        {
            
client_cmd(id"disconnect")
            
client_print(0print_chat"%s %s have been kicked for not typing .rdy for 2 minutes."PREFIXplayername)
        }
    }
    
    return 
PLUGIN_HANDLED
}

public 
Prepare(id)
{
    new 
playersteam[30]
    
get_user_authid(idplayersteam29)
    
    for (new 
kk<typedalrdycounter k++)
    {
        if (
equali(playersteamtypedalrdy[k]))
        {
            
client_print(idprint_chat"%s You have already typed .rdy!"PREFIX)
            return 
PLUGIN_HANDLED;
        }
        
        else if ((
iszero[k] != 1))
        {
            
client_print(idprint_chat"%s You are now ready!"PREFIX)
            
copy(typedalrdy[k], 29playersteam)
            
typedalrdycounter++
            
playersleft--
            
iszero[typedalrdycounter] = 1
        
}
        
    }
        
    if (
iszero[typedalrdycounter] != 1)
    {
        
copy(typedalrdy[typedalrdycounter], 29playersteam)
        
typedalrdycounter++
        
playersleft--
    } 
Diegorkable is offline
 



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 01:09.


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