24.10.2012, 21:08
Hello, i made this command just for admins to list all paused players, but for some reason, even if player pause, the list is empty.
On other "news"
When a player pause:
Unpause:
pawn Код:
CMD:pausers(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new count = 1, name[24], string[200];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
if(IsPaused[i] == 1)
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s%s (%d\n", string, name,i);
count ++;
}
}
if(count != 1)
{
ShowPlayerDialog(playerid, 24, DIALOG_PAUSED, "Paused Players", string, "OK", "");
}
else ShowPlayerDialog(playerid, 24, DIALOG_PAUSED, "Paused Players", "No paused players.", "OK", "");
}
return 1;
}
pawn Код:
new IsPaused[MAX_PLAYERS];
pawn Код:
IsPaused[playerid] =1;
pawn Код:
IsPaused[playerid] =0;