Raised This Month: $ Target: $400
 0% 

[DONE]Code doesn't work correctly...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-07-2013 , 10:41   [DONE]Code doesn't work correctly...
Reply With Quote #1

I have this code:

PHP Code:
new round
new VIPMenuRound
<...>
    
VIPMenuRound register_cvar("amx_vipmenu_round""2")
    
register_logevent("LogEvent_RoundStart"2"1=Round_Start" );
    
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")
<...>
public 
LogEvent_RoundStart()
{
    
CurrentRound++;
}

public 
Event_RoundRestart()
{
    
CurrentRound=0;
}

public 
cmdvipmenu(id
{
    
round get_pcvar_num (VIPMenuRound)
    if( 
CurrentRound >= round )
    {
        
Showrod(id)
    }

It shouldn't let players use vipmenu until certain round, set by cvar, but it lets use it at first round...

Last edited by Unkolix; 02-08-2013 at 08:26.
Unkolix is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-07-2013 , 10:43   Re: Code doesn't work correctly...
Reply With Quote #2

You should add for the first round:
PHP Code:
register_logevent("somefunc"2"0=World triggered""1&Restart_Round_")
register_logevent("somefunc"2"0=World triggered""1=Game_Commencing"

Last edited by Kard1nal; 02-07-2013 at 10:44.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-07-2013 , 10:46   Re: Code doesn't work correctly...
Reply With Quote #3

I have this added:
PHP Code:
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")
<...>
public 
Event_RoundRestart()
{
    
CurrentRound=0;


Last edited by Unkolix; 02-07-2013 at 10:46.
Unkolix is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-08-2013 , 00:33   Re: Code doesn't work correctly...
Reply With Quote #4

New Round / Player Spawn / Round Start / Round End - do Not mess it
__________________
fysiks is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-08-2013 , 01:43   Re: Code doesn't work correctly...
Reply With Quote #5

It works... Thanks fir answers.
Unkolix 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 20:35.


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