Raised This Month: $ Target: $400
 0% 

Solved don't change before x rounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 07-29-2017 , 14:00   don't change before x rounds
Reply With Quote #1

hi guys
i made a small plugin which block change map when rounds didn't reach 14.
but it's not works
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Ayman Khaled"

new CurrentRound
new g_szAllowedRoundsp_AllowedRounds

public plugin_init() {
    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("amx_map""cmdMap")
    
register_clcmd("amx_votemap""cmdMap")
    
    
g_szAllowedRounds register_cvar("change_map_rounds""14")
    
p_AllowedRounds get_pcvar_num(g_szAllowedRounds)
    
    
register_logevent("Hook_NewR"2"1=Round_Start" );
    
register_event("TextMsg""Hook_Restart""a""2&#Game_C""2&#Game_w""2&#Game_will_restart_in" );
}

public 
Hook_NewR()
{
    
CurrentRound++
}

public 
Hook_Restart()
{
    
CurrentRound=0;
}

public 
cmdMap(id)
{
    if(
CurrentRound p_AllowedRounds)
        return 
PLUGIN_HANDLED
    
    
return PLUGIN_CONTINUE

__________________

Last edited by Ayman Khaled; 07-29-2017 at 23:46. Reason: solved
Ayman Khaled is offline
 


Thread Tools
Display Modes

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 22:58.


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