How to make GM with 2 languages?
#2

pawn Code:
#define LAN_SERBIAN 1
#define LAN_ENGLISH 2

//...
new iLanguage[ MAX_PLAYERS char ];


//...
public OnPlayerConnect( playerid )
{
    // Set the player's language somewhere here.
    if( iLanguage{ playerid } == LAN_SERBIAN )
    {
        SendClientMessage( playerid, 0xFFFFFF, "Something serbian here." );
    }

    else
    {
        SendClientMessage( playerid, 0xFFFFFF, "Something english here." );
    }

    return true;
}

// Another method
stock SendLanMessage( playerid, color, const serbianMsg[ ], const englishMsg[ ] )
{
    if( iLanguage{ playerid } == LAN_SERBIAN )
    {
        SendClientMessage( playerid, color, serbianMsg );
    }

    else
    {
        SendClientMessage( playerid, color, englishMsg );
    }

    return true;
}

//to use...
SendLanMessage( playerid, 0xFFFFFF, "serbian", "english" );
Reply


Messages In This Thread
How to make GM with 2 languages? - by Gotti_ - 08.03.2011, 06:31
Re: How to make GM with 2 languages? - by thiaZ_ - 08.03.2011, 06:38
Re: How to make GM with 2 languages? - by Davz*|*Criss - 08.03.2011, 06:39
Re: How to make GM with 2 languages? - by Gotti_ - 08.03.2011, 07:16
Re: How to make GM with 2 languages? - by Gotti_ - 08.03.2011, 09:28
Re: How to make GM with 2 languages? - by iggy1 - 08.03.2011, 09:38
Re: How to make GM with 2 languages? - by Gotti_ - 08.03.2011, 09:56
Re: How to make GM with 2 languages? - by iggy1 - 08.03.2011, 10:04
Re: How to make GM with 2 languages? - by Gotti_ - 08.03.2011, 10:15
Re: How to make GM with 2 languages? - by iggy1 - 08.03.2011, 10:20

Forum Jump:


Users browsing this thread: 3 Guest(s)