23.07.2015, 19:46
I'm doing a command / report with the information that players are online or offline, only the second line of dialogue informs properly if the player is online or not, the second line down is all offline, help please?
PHP код:
command(relato, playerid, params[]) {
new OtherPlayer, Name[24], Reason[128], Msg[128];
SendAdminText(playerid, "/relato", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "us[128]", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Uso: \"/relato [id] [causa]");
else
{
if (APlayerData[OtherPlayer][LoggedIn] == true)
{
SendReportToAdmins(OtherPlayer, Reason);
GetPlayerName(OtherPlayer, Name, sizeof(Name));
format(Msg, 128, "Seu relato contra jogador(a) %s foi enviado aos administradores ", Name));
SendClientMessage(playerid, 0x808080FF, Msg);
if (AReports[0][ReportUsed] == true)
format(ReportList, 5000, "%s: %s - %s\n", AReports[0][ReportName], AReports[0][ReportReason], IsPlayerConnected(OtherPlayer) ? ("Online") : ("Offline"));
for (new i = 1; i < 50; i++)
{
if (AReports[i][ReportUsed] == true)
{
format(ReportList, 5000, "%s%s: %s - %s\n", ReportList, AReports[i][ReportName], AReports[i][ReportReason], IsPlayerConnected(i) ? ("Online") : ("Offline"));
}
}
ShowPlayerDialog(playerid, DialogReports, DIALOG_STYLE_MSGBOX, "Relatуrio:", ReportList, "OK", "Cancelar");
}
else
SendClientMessage(playerid, 0xff000099, "ERRO:O jogador nao estб conectado.");
}
}
else
return 0;
return 1;
}