08.03.2011, 06:38
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" );