Raised This Month: $ Target: $400
 0% 

int not reseting by rounds end


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
darkd
New Member
Join Date: Jul 2009
Old 08-16-2009 , 03:23   int not reseting by rounds end
Reply With Quote #1

Hey there, im having a problem, the int i created doesn't reset at rounds end. Can somebody help me?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "smartAwp"
#define VERSION "1.0"
#define AUTHOR "DarkD"

new smartawp_enable
new awpTry


public plugin_init() {
    
register_plugin("smartAwp""1.0""DarkD")
    
smartawp_enable register_cvar("smartawp_enable""1")
    
register_clcmd("say /awp""smartAwp");
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
}

public 
HLTV() {
    
awpTry 0;
}

public 
smartAwp(id){
    if ( !
is_user_alive(id) ) return PLUGIN_HANDLED;
    
    if(
get_pcvar_num(smartawp_enable)==1) {
        if(
awpTry == 0) {
            switch ( 
random_num(03) )
            {
                case 
0client_print(idprint_chat"Sorry, no AWP for you this round.");
                    case 
1client_print(idprint_chat"Sorry, no AWP for you this round.");
                    case 
2client_print(idprint_chat"Sorry, no AWP for you this round.");
                    case 
3give_item(id"weapon_awp");
                }
            
awpTry 1;
            } else if(
awpTry == 1) {
            
client_print(idprint_chat"You already tryed to get a awp this round!");
        }
        } else if(
get_pcvar_num(smartawp_enable)==0) {
        
client_print(idprint_chat"This plugin is disabled.");
    }
    return 
PLUGIN_CONTINUE;        

darkd 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 15:12.


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