AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with message (https://forums.alliedmods.net/showthread.php?t=193351)

kyriuch 08-18-2012 14:18

Problem with message
 
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?

Liverwiz 08-18-2012 14:33

Re: Problem with message
 
try using LANG_PLAYER instead of id.

kyriuch 08-18-2012 14:48

Re: Problem with message
 
I am not too good. Could u explain how?

Torge 08-18-2012 15:57

Re: Problem with message
 
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 


kyriuch 08-18-2012 16:31

Re: Problem with message
 
This is not what I wanted but problem is fixed, thanks anyway


All times are GMT -4. The time now is 05:53.

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