17.05.2015, 09:31
Help me pls how i can repair this it have 0 error but doesn't work
dcmd_Admins(playerid, params[])
{
#pragma unused params
if (InDm[playerid] >= 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR:You can't use this command in a dm/event.");
new sendername[MAX_PLAYER_NAME], string2[256], string[256], count;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (GetPlayerName(i, sendername, sizeof(sendername)) && PlayerInfo[i][Admin] >= 1) return format(string, sizeof (string), "%s{ff0000}%s{0DF600}[ID: %d] {00E1B8}Level: %d\n", string, sendername, i, PlayerInfo[i][Admin]);
if(GetPlayerName(i, sendername, sizeof(sendername)) && PlayerInfo[i][Admin] >= 1 && IsPlayerAdmin(i)) return format(string2, sizeof (string2), "%s{ff0000}%s{0DF600}[ID: %d] {00E1B8}Level: %d {FFBF00}(RCON)\n", string2, sendername, i, PlayerInfo[i][Admin]);
++count;
if (count) ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_LIST, "Admins Online", string, string2, "Close");
else SendClientMessage(playerid, 0xFF0000FF, "No admins online.");
}
return 1;
}
dcmd_Admins(playerid, params[])
{
#pragma unused params
if (InDm[playerid] >= 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR:You can't use this command in a dm/event.");
new sendername[MAX_PLAYER_NAME], string2[256], string[256], count;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (GetPlayerName(i, sendername, sizeof(sendername)) && PlayerInfo[i][Admin] >= 1) return format(string, sizeof (string), "%s{ff0000}%s{0DF600}[ID: %d] {00E1B8}Level: %d\n", string, sendername, i, PlayerInfo[i][Admin]);
if(GetPlayerName(i, sendername, sizeof(sendername)) && PlayerInfo[i][Admin] >= 1 && IsPlayerAdmin(i)) return format(string2, sizeof (string2), "%s{ff0000}%s{0DF600}[ID: %d] {00E1B8}Level: %d {FFBF00}(RCON)\n", string2, sendername, i, PlayerInfo[i][Admin]);
++count;
if (count) ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_LIST, "Admins Online", string, string2, "Close");
else SendClientMessage(playerid, 0xFF0000FF, "No admins online.");
}
return 1;
}