AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Warn System Multi-Lingual menu problem. (https://forums.alliedmods.net/showthread.php?t=214530)

Unkolix 04-28-2013 06:06

Warn System Multi-Lingual menu problem.
 
So... I've tried to make Warn System plugin to multi-lingual and I am having prolems...
So I have this part:
PHP Code:

new const szReasons[][] = {
    
"REASON_1",
    
"REASON_2",
    
"REASON_3",
    
"REASON_4",
    
"REASON_5"
}
/***/
new szTemp[500], Key[10]
for(new 
isizeof(szReasons); i++) 
{
    
formatex(szTempcharsmax(szTemp), "%L"id"%s"szReasons[i])
    
num_to_str(iKeycharsmax(Key))
    
menu_additem(menuszTempKey)
}
/***/
client_print_color(0"%L"0"HAS_WARNED"szName3szName2iWarns[iPlayer], get_pcvar_num(pWarnAmmount), szReasons[szReason[id]]) 

And it doesn't show the reason in the menu and in that message... And I need help figuring out how to fix it. ;)

Full edited plugin:
Spoiler

ConnorMcLeod 04-28-2013 07:39

Re: Warn System Multi-Lingual menu problem.
 
PHP Code:

    formatex(szTempcharsmax(szTemp), "%L"id"%s"szReasons[i]) 

PHP Code:

    formatex(szTempcharsmax(szTemp), "%L"idszReasons[i]) 


PHP Code:

client_print_color(0"%L"0"HAS_WARNED"szName3szName2iWarns[iPlayer], get_pcvar_num(pWarnAmmount), szReasons[szReason[id]]) 

PHP Code:

client_print_color(0"%L"0"HAS_WARNED"szReasons[szReason[id]], szName3szName2iWarns[iPlayer], get_pcvar_num(pWarnAmmount)) 

This is the correct order, but szReasons[szReason[id]] seems bizarre, would be more correct as szReasons[iReason[id]] or szReasons[g_iReason[id]], but haven't read your code.

Unkolix 04-28-2013 08:51

Re: Warn System Multi-Lingual menu problem.
 
The menu one is ok, but the message is wrong...

It shows now:
Code:

[AMXX] REASON_1 has warned Unkolix [85/3]. Reason: .
It showed:
Code:

[AMXX] Unkolix has warned Unkolix [1/3]. Reason: REASON_1.


All times are GMT -4. The time now is 10:56.

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