Possible methods of doing this better?
#1

pawn Код:
stock SendMessage(playerid, colour, English[], Spanish[])
{
    switch( p_Data[Language][playerid] )
    {
        case 0: //English
        {
            SendClientMessage(playerid, colour, English);
        }
        case 1: //Spanish
        {
            SendClientMessage(playerid, colour, Spanish);
        }
    }
    return true;
}

public      OnPlayerSpawn(playerid) {
       
    if(player_FirstSpawn[playerid] == true) {
   
        new
            m_Str[128], m_Str2[128];
   
        format(m_Str, sizeof(m_Str), ""#CYAN"Message of the Day: "#WHITE"%s", ServerMOTD);
        format(m_Str2, sizeof(m_Str2), ""#CYAN"Mensaje del Dнa: "#WHITE"%s");
        SendMessage(playerid, -1, m_Str, m_Str2);
       
        if(p_Data[Language][playerid] == -1) {
            ShowPlayerDialog(playerid, DIALOG_LANGUAGE, DIALOG_STYLE_LIST, ""#CYAN"Select your language", LANGUAGE_SELECTION, "Select", ""); }
       
    }
    return true;
}
Are there any other ways to do that which could possibly be more efficient?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=295580
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)