AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Help zp extra item round limits (https://forums.alliedmods.net/showthread.php?t=241050)

ghost95v 05-26-2014 18:00

Help zp extra item round limits
 
ANY BODY CAN HELP ME WITH THIS EXTRA ITEM ,THIS EXTRA ITEM IS BUYABLE ,AFTER 1 ROUND IS NOT BUYABLE AND NEXT ROUND IS BUYABLE AGAIN ..HOW CAN I ADD 3 MORE ROUNDS TO LIMIT THIS ITEM :/ .THNX ALL CODE IS HERE
PHP Code:

#include <amxmodx>   
#include <zombieplague>   
#include <fakemeta_util>   

new const g_item_name[] = { "Nemesis" }   
const 
g_item_cost 50   
new count[33]   

// Item IDs   
new g_nemesis   

public plugin_init()   
{   
    
register_plugin("[ZP] New Buy Nemesis""2.0""GPOWER")   
    
register_logevent("round_start"2"1=Round_Start")   
    
g_nemesis zp_register_extra_item(g_item_nameg_item_costZP_TEAM_HUMAN)       
    
count[0] = 0;   

}   
public 
zp_extra_item_selected(playeritemid)   
{   
    if (
itemid == g_nemesis)   
    {   
        if(
zp_has_round_started())  
        {  
            
client_print(playerprint_chat"[ZP] You Can't Buy Nemesis Now !")   
            return 
ZP_PLUGIN_HANDLED  
        
}  
        else  
        {  
            if(
count[0] == 0)   
            {       
                
zp_make_user_nemesis(player)   
                
count[0] = 1;   
            }   
            else   
            {   
                
client_print(playerprint_chat"[ZP] The nemesis cant be bought 2 rounds in a row, try next round !")    
                return 
ZP_PLUGIN_HANDLED   
            
}   
        }  
    }   
    return 
PLUGIN_CONTINUE   
}   
public 
round_start()   
{   
        if(
count[0] == 1)   
        {   
            
count[0] = 2;   
        }   
        else if(
count[0] == 2)   
        {   
            
count[0] = 0;   
        } 


Torge 05-27-2014 08:01

Re: Help zp extra item round limits
 
Oh, another topic with the same problem? Please next time turn ur caps lock off. Damn annoying.


All times are GMT -4. The time now is 08:51.

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