05.09.2013, 18:40
Tenta agora
Nгo se abre chaves depois do return!
PHP код:
COMMAND:relatos(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/relatos", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] < 2)
{
// Add the first report to the list (if it exists)
if (AReports[0][ReportUsed] == true)
format(ReportList, 5000, "%s: %s\n", AReports[0][ReportName], AReports[0][ReportReason]);
// Construct the report-dialog
for (new i = 1; i < 50; i++)
{
// Check if the ReportID has been used already
if (AReports[i][ReportUsed] == true)
{
format(ReportList, 5000, "%s%s: %s\n", ReportList, AReports[i][ReportName], AReports[i]
[ReportReason]);
}
}
// Show all the reports
ShowPlayerDialog(playerid, DialogReports, DIALOG_STYLE_LIST, "Lista de Relatos:", ReportList, "Ok",
"Cancelar");
}
else
return SendClientMessage(playerid, -1, "{FF0000}Vocк nгo й administrador");;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}