Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

ShowPlayerDialog Color is Messed

$
0
0
The title itself explains my problem, this is not the only place where colors are messed up. On every other ShowPlayerDialog colors are messed up too.

This is the code:
Code:

#define DIALOG_RANDOM 1

CMD:serverdetails(playerid, params[])
{
    new TRequireRegister[4], TRequireLogin[4], TSaveLogs[4], TReadAdministratorCommands[4], TReadCommands[4], TAntiAdvertisement[4], TChat[4], TLockServer[4];
       
    if(ServerInfo[RequireRegister]              == 1) TRequireRegister              = "Yes"; else TRequireRegister                                  = "No";
    if(ServerInfo[RequireLogin]                == 1) TRequireLogin                = "Yes"; else TRequireLogin                                  = "No";
    if(ServerInfo[SaveLogs]                    == 1) TSaveLogs                    = "Yes"; else TSaveLogs                                          = "No";
    if(ServerInfo[ReadAdministratorCommands]    == 1) TReadAdministratorCommands    = "Yes"; else TReadAdministratorCommands        = "No";
    if(ServerInfo[ReadCommands]                == 1) TReadCommands                = "Yes"; else TReadCommands                                  = "No";
    if(ServerInfo[AntiAdvertisement]            == 1) TAntiAdvertisement            = "Yes"; else TAntiAdvertisement                          = "No";
    if(ServerInfo[Chat]                        == 1) TChat                        = "Yes"; else TChat                                                  = "No";
    if(ServerInfo[LockServer]                  == 1) TLockServer                  = "Yes"; else TLockServer                                          = "No";
       
    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
    SendCommandsToAdmins(playerid, "serverdetails");

    new DIALOG[1246], string[141];
       
    format(string, sizeof(string), ""COL_YELLOW"1) "COL_WHITE"Maximum Administrator Level - "COL_LIME" %d.\n", ServerInfo[MaximumAdministratorLevel]);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"2) "COL_WHITE"Maximum Donor Level - "COL_LIME" %d.\n", ServerInfo[MaximumDonorLevel]);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"3) "COL_WHITE"Maximum Helper Level - "COL_LIME" %d.\n", ServerInfo[MaximumHelperLevel]);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"4) "COL_WHITE"Require Register - "COL_LIME" %s.\n", TRequireRegister);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"5) "COL_WHITE"Require Login - "COL_LIME" %s.\n", TRequireLogin);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"6) "COL_WHITE"Maximum Login Attempt - "COL_LIME" %d.\n", ServerInfo[MaximumLoginAttempt]);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"7) "COL_WHITE"Maximum Warning - "COL_LIME" %d.\n", ServerInfo[MaximumWarning]);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"8) "COL_WHITE"Save Logs - "COL_LIME" %s.\n", TSaveLogs);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"9) "COL_WHITE"Read Administrator Commands - "COL_LIME" %s.\n", TReadAdministratorCommands);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"10) "COL_WHITE"Read Commands - "COL_LIME" %s.\n", TReadCommands);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"11) "COL_WHITE"Anti Advertisement - "COL_LIME" %s.\n", TAntiAdvertisement);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"12) "COL_WHITE"Chat - "COL_LIME" %s.\n", TChat);
    strcat(DIALOG, string);
    format(string, sizeof(string), ""COL_YELLOW"13) "COL_WHITE"Server Locked - "COL_LIME" %s.", TLockServer);
    strcat(DIALOG, string);
       
    ShowPlayerDialog(playerid, DIALOG_RANDOM, DIALOG_STYLE_MSGBOX, ""COL_LIME"Server Details:", DIALOG, "Close", "");
    return 1;
}

And this is how it looks:

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>