Raised This Month: $51 Target: $400
 12% 

Need help on multilingual system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_Master_
Senior Member
Join Date: Dec 2006
Old 05-01-2007 , 11:00   Need help on multilingual system
Reply With Quote #1

Can anyone please tell me what's wrong with this ?
PHP Code:
//________________________________________________________________________________________
//
//    GLOBAL util_show_activity_compact() - reports and logs admin activity on server
//________________________________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stock util_show_activity_compact(id=0cidplayeridarg[] = ""showit 1logit 1){
    new 
admin_name[32] = "CONSOLE"admin_authid[35] = "STEAM_SERVER"admin_ip[20] = "LOOPBACK"admin_level[27] = "FULL"
    
new target_name[32], target_authid[35], target_ip[20], target_level[27]
    new 
command_used[32], command_flagcommand_info[2], left[32], right[32], head[8], text[256], doshow
    
    
if(util_is_valid_player(id)){
        
        
get_user_name(idadmin_name31)
        
get_user_authid(idadmin_authid34)
        
get_user_ip(idadmin_ip19)
        
get_flags(get_user_flags(id), admin_level26)
    }
    
    
get_concmd(cidcommand_used31command_flagcommand_info10)
    
strtoupper(command_used)
    
    if(
arg[0]) strtok(argleft31right31' ')
    
    
format(head7"%L"LANG_PLAYER"GLOBAL_SHOWHEAD")
    
    switch(
playerid){
        
        case 
SELECT_ALLformatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWALL")
        case 
SELECT_TSformatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWTEAMT")
        case 
SELECT_CTSformatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWTEAMCT")
        case 
SELECT_SPECTformatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWTEAMSPECT")
        case 
SELECT_NOTEAMformatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWNOTEAM")
        case 
SELECT_SERVERformatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWSERVER")
        case 
SELECT_SERVER_Ntext[0] = 0
        
default:{
            
            
get_user_name(playeridtarget_name31)
            
get_user_authid(playeridtarget_authid34)
            
get_user_ip(playeridtarget_ip19)
            
get_flags(get_user_flags(playerid), target_level26)
            
            
formatex(text255" %L"LANG_PLAYER"GLOBAL_SHOWUSER"target_name)
        }
    }
    
    
doshow 1
    
    
switch(get_cvar_num("amx_show_activity")){
            
        case 
1:    admin_name[0] = 0
        
case 0:    doshow 0
    
}
    
    if(
showit && doshow){
        new 
temp[256]
        
        if(
left[0]){
            
            if(
right[0]) formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_nameleftrighttext)
            else 
formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_nameleft""text)
        }
        else 
formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_name""""text)
        
        
client_print(0print_chat"%s %s"headtemp)
    }
    
    if(
logit){
        new 
loghead[MAX_LOG_LINE], temp[MAX_LOG_LINE]
        
        if(
playerid == SELECT_SERVER_Ntext[0] = 0
        
else if(playerid SELECT_ERRORformatex(text255" %L"LANG_PLAYER"GLOBAL_LOGUSER"target_nametarget_iptarget_authidtarget_level)
        
        if(!
admin_name[0]) get_user_name(idadmin_name31)
        
        
formatex(logheadMAX_LOG_LINE 1"%L"LANG_SERVER"GLOBAL_LOG"headadmin_nameadmin_ipadmin_authidadmin_levelcommand_used)
        
        if(
left[0]){
            
            if(
right[0]) formatex(tempMAX_LOG_LINE 1"%L"LANG_SERVERcommand_usedlogheadleftrighttext)
            else 
formatex(tempMAX_LOG_LINE 1"%L"LANG_SERVERcommand_usedlogheadleft""text)
        }
        else 
formatex(tempMAX_LOG_LINE 1"%L"LANG_SERVERcommand_usedloghead""""text)
        
        
util_log_ammxx(LOG_LOG_Ttemp)
    }

For reasons beyond my understanding this fails to show anything
_Master_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-01-2007 , 11:36   Re: Need help on multilingual system
Reply With Quote #2

Have you registered dictionary file? Does the file exist in your data/lang/ directory ?
__________________
Arkshine is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 05-01-2007 , 11:42   Re: Need help on multilingual system
Reply With Quote #3

Yes.
On a side note, the util_log_ammxx() works fine, tho it uses the same ML and has the same format (more or less)
_Master_ is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-01-2007 , 11:49   Re: Need help on multilingual system
Reply With Quote #4

Have you added to debug statements to make sure there is no logic errors in your code?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 05-02-2007 , 04:36   Re: Need help on multilingual system
Reply With Quote #5

i have no idea what's wrong with this
PHP Code:
if(left[0]){ 
             
            if(
right[0]) formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_nameleftrighttext
            else 
formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_nameleft""text
        } 
        else 
formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_name""""text
but if I change it to
PHP Code:
formatex(temp255"%L"LANG_PLAYERcommand_usedadmin_nameleftrighttext
it works. Donno why it does that.
Thanks guys
_Master_ is offline
Reply



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:36.


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