Raised This Month: $ Target: $400
 0% 

Warn System Multi-Lingual menu problem.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 04-28-2013 , 06:06   Warn System Multi-Lingual menu problem.
Reply With Quote #1

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

Last edited by Unkolix; 04-28-2013 at 06:09.
Unkolix is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-28-2013 , 07:39   Re: Warn System Multi-Lingual menu problem.
Reply With Quote #2

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.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-28-2013 at 07:39.
ConnorMcLeod is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 04-28-2013 , 08:51   Re: Warn System Multi-Lingual menu problem.
Reply With Quote #3

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.

Last edited by Unkolix; 04-28-2013 at 08:51.
Unkolix 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 10:56.


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