Raised This Month: $ Target: $400
 0% 

Equal and sizeof.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ex3cuTioN
Member
Join Date: May 2010
Old 08-10-2011 , 03:26   Equal and sizeof.
Reply With Quote #1

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

//WPN
new weapon_list[9][] = {
    
"scout",
    
"sg550",
    
"famas",
    
"usp",
    
"awp",
    
"m249",
    
"m4a1",
    
"deagle",
    
"p90"
};

public 
plugin_init() {
    
register_plugin("WPN""0.01""Ex3cuTioN");
    
register_clcmd("say","cmdWPN");
}

public 
cmdWPN(id) {
    static 
s_Args[32];
    
read_args(s_Argssizeof(s_Args) - 1);
    
    if(!
s_Args[0])
        return 
PLUGIN_CONTINUE;
        
    
remove_quotes(s_Args);
    
    for(new 
09i++) {
        
replace(s_Argssizeof(s_Args) - 1"/""");
        if(
equal(s_Argsweapon_list[i], sizeof(weapon_list[i]) - 1)) {
            new 
x[8];
            
format(x7"weapon_%s"s_Args);
            
            
give_item(idx);
            
client_print(idprint_chat"You received %s"s_Args);
        }
    }
    
    return 
PLUGIN_CONTINUE;

What the heck is wrong at if(equal(s_Args, weapon_list[i], sizeof(weapon_list[i]) - 1)) { ?????

Last edited by Ex3cuTioN; 08-10-2011 at 03:35.
Ex3cuTioN 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 03:31.


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