AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Event on 2-nd round start (https://forums.alliedmods.net/showthread.php?t=158878)

alonelive 06-10-2011 12:42

[HELP] Event on 2-nd round start
 
1 Attachment(s)
how to make the plugin started to work not after 150 seconds, and after the second round start?

PHP Code:

public plugin_cfg()
{
    
menu menu_create("\wСколько вы хотите поиграть на этой карте?""menu_handler")
    
    for(new 
i=0;i<MAX_RESULTS;i++)
        
g_tls[i] = get_pcvar_num(tls[i])
    
    
set_task(150.0"start_vote")
    
    
build_menu()



lis_16 06-10-2011 13:26

Re: [HELP] Event on 2-nd round start
 
Read about round start event, make a global variable and add +1 to it after every round started. In this same event check if (variable>=2) force start_vote.

reinert 06-10-2011 14:28

Re: [HELP] Event on 2-nd round start
 
Check,

if(variable == 2)

because if you check if variable is equal or greater than 2 then it will give a menu everyround after second one.

lis_16 06-10-2011 14:51

Re: [HELP] Event on 2-nd round start
 
My bad.


All times are GMT -4. The time now is 23:24.

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