Raised This Month: $ Target: $400
 0% 

Problem with message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kyriuch
Member
Join Date: Jul 2010
Old 08-18-2012 , 14:18   Problem with message
Reply With Quote #1

Code:
public Message(id)
{
        new sName[ 32 ], sSID[ 32 ]
        get_user_name( id, sName, charsmax ( sName ) )
        get_user_authid( id, sSID, charsmax ( sSID ) )
        
        new sLang[ 3 ]
        
        get_user_info( id, "lang", sLang, charsmax ( sLang ) )
        
        if( equali ( sLang, "pl" ) )
        {
                ColorChat( id, GREY, "%L", id, "SMN_APPEARD", PlayerSex( id ) == 1 ? "pojawila" : "pojawil", sName, Enters[ id ] <= 1 ? "dopiero" : "juz", PlayerSex( id ) == 1 ? "jej" : "jego", Enters[ id ], PlayerSex( id ) == 1 ? "Jej" : "Jego", sSID )
        }
        else
        {
                ColorChat( id, GREY, "%L", id, "SMN_APPEARD", sName, PlayerSex( id ) == 1 ? "her" : "his", Enters[ id ], Enters[ id ] > 1 ? ( Enters[ id ] > 2 ? ( Enters[ id ] == 3 ? "rd" : "th" ) : "nd" ) : "st", PlayerSex( id ) == 1 ? "Her" : "His", sSID )
        }
}
Got problem with this code, you see, there are 2 version of message, message in pl languange and in others. Problem is: when I have languange pl, and other player have languange en, I see two messages, about me, and about other player. But message about me is in pl, message about other player is in en. Help me fix that. Players with pl must see pl messages and other player must see only en messages. How do that?
kyriuch is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-18-2012 , 14:33   Re: Problem with message
Reply With Quote #2

try using LANG_PLAYER instead of id.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
kyriuch
Member
Join Date: Jul 2010
Old 08-18-2012 , 14:48   Re: Problem with message
Reply With Quote #3

I am not too good. Could u explain how?
kyriuch is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-18-2012 , 15:57   Re: Problem with message
Reply With Quote #4

PHP Code:
ColorChatidGREY"%L"LANG_PLAYER"SMN_APPEARD"PlayerSexid ) == "pojawila" "pojawil"sNameEntersid ] <= "dopiero" "juz"PlayerSexid ) == "jej" "jego"Entersid ], PlayerSexid ) == "Jej" "Jego"sSID 
PHP Code:
ColorChatidGREY"%L"LANG_PLAYER"SMN_APPEARD"sNamePlayerSexid ) == "her" "his"Entersid ], Entersid ] > ? ( Entersid ] > ? ( Entersid ] == "rd" "th" ) : "nd" ) : "st"PlayerSexid ) == "Her" "His"sSID 
Torge is offline
kyriuch
Member
Join Date: Jul 2010
Old 08-18-2012 , 16:31   Re: Problem with message
Reply With Quote #5

This is not what I wanted but problem is fixed, thanks anyway
kyriuch 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 05:53.


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