Raised This Month: $ Target: $400
 0% 

HELP Unknown Command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-01-2010 , 13:10   HELP Unknown Command
Reply With Quote #1

I have this simple pluguin with gives money
PHP Code:
public admin_givemoney(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED
    
    
new arg[32], arg2[32]
    
read_argv(1,arg,32)
    
read_argv(2,arg2,31)
    
    new 
adminAuthid[36], adminName[32]
    
get_user_authid(id,adminAuthid,35)
    
get_user_name(id,adminName,31)
    
    new 
amount str_to_num(arg2)
    if(
amount 0) {
        
console_print(id,"%L"LANG_PLAYERAMX_SUPER_AMOUNT_GREATER)
        return 
PLUGIN_HANDLED
    
}
    
    if(
arg[0] == '@')
    {
        new 
players[32], pnumi;
        if(
containi(arg"ALL") != -1get_players(playerspnum)
        else 
get_players(playerspnum"ae", (containi(arg"CT") != -1) ? "CT" "TERRORIST");
        if(!
pnum) return PLUGIN_HANDLED;
        new 
pidmoney;
        for(
0pnumi++)
        {
            
pid players[i];
            
money amount cs_get_user_money(pid);
            if(
money 16000money 16000;
            
cs_set_user_money(pidmoney)
        }
        switch(
get_pcvar_num(amx_show_activity))
        {
            case 
2client_print(0print_chat"%L"LANG_PLAYER"AMX_SUPER_GIVEMONEY_TEAM_CASE2"adminNameamountarg[1]);
            case 
1client_print(0print_chat"%L"LANG_PLAYER"AMX_SUPER_GIVEMONEY_TEAM_CASE1"amountarg[1]);
        }
        
console_print(id"%L"LANG_PLAYER"AMX_SUPER_GIVEMONEY_TEAM_MSG"amountarg[1]);
        
log_amx("%L"LANG_SERVER"AMX_SUPER_GIVEMONEY_TEAM_LOG"adminNameadminAuthidamountarg[1]);
    }
    else
    {
        
        new 
player cmd_target(id,arg,2)
        if(!
player) return PLUGIN_HANDLED
    
        
new playerName[32]
        
get_user_name(player,playerName,31)
        
        new 
playerAuthid[36]
        
get_user_authid(player,playerAuthid,35)
    
        
cs_set_user_money(player,cs_get_user_money(player)+amount)
        
        switch(
get_pcvar_num(amx_show_activity))
        {
            case 
2client_print(0,print_chat,"%L"LANG_PLAYER"AMX_SUPER_GIVEMONEY_TEAM_CASE2",adminName,amount,playerName)
            case 
1client_print(0,print_chat,"%L"LANG_PLAYER"AMX_SUPER_GIVEMONEY_TEAM_CASE1",amount,playerName)
        }
        
        
console_print(id,"%L"LANG_PLAYER"AMX_SUPER_GIVEMONEY_TEAM_MSG",amount,playerName,amount)
        
log_amx("%L"LANG_SERVER"AMX_SUPER_GIVEMONEY_TEAM_LOG",adminName,adminAuthid,amount,playerName,playerAuthid)

    }
    return 
PLUGIN_HANDLED

But when i used it, it prints unknown command. It works pefectlly but that unknown command message is driving me crazy.

I have a diccionary with al the variables which appear but still.



Thanks
totalcsscripting 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 00:16.


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