21.05.2012, 08:31
Hey guys.
I want to change my AFKList, My AFK List creates 1 line everytime there is Player AFK
i don't wanna have big big big long dialog that list many AFK Players.
How can i make like this?
instead of
my AFKList is in Dialog.
CODE:
I want to change my AFKList, My AFK List creates 1 line everytime there is Player AFK
i don't wanna have big big big long dialog that list many AFK Players.
How can i make like this?
Код:
Romel(0), John(1), Ruzie(5)
Код:
Romel(0) John(1) Ruzie(5)
CODE:
pawn Код:
CMD:afklist(playerid, params[])
{
new string[900];
new fstring[900];
new count = 0;
for(new slots = GetMaxPlayers(), i; i < slots; i++)
{
if (!IsPlayerConnected(i)) continue;
if(pData[i][pAFK] > 1)
{
count++;
format(fstring, 900, "%s (%d)\r\n\nTotal AFK Players: %d", GetpName(i), i, count);
strcat(string, fstring, 900);
ShowPlayerDialog(playerid, AFKLIST, DIALOG_STYLE_MSGBOX, "[iP] AFK Players", string, "OK", "");
}
}
if(count == 0) return ShowPlayerDialog(playerid, AFKLIST, DIALOG_STYLE_MSGBOX, "[iP] AFK Players", ""red"There is no current AFK Players!", "OK", "");
return 1;
}