pausers list little help -
Face9000 - 24.10.2012
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.
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;
}
On other "news"
pawn Код:
new IsPaused[MAX_PLAYERS];
When a player pause:
Unpause:
Re: pausers list little help -
ikkentim - 24.10.2012
Change if(count != 1)
To
if(count > 0)
Re: pausers list little help -
ViniBorn - 24.10.2012
pawn Код:
CMD:pausers(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new bool:count, name[24], string[200];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPaused[i] == 1)
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s%s (%d\n", string, name,i);
count = true;
}
}
if(count) ShowPlayerDialog(playerid, 24, DIALOG_PAUSED, "Paused Players", string, "OK", "");
else ShowPlayerDialog(playerid, 24, DIALOG_PAUSED, "Paused Players", "No paused players.", "OK", "");
}
return 1;
}
Re: pausers list little help -
Face9000 - 25.10.2012
Nothing, still doesn't work.
Re: pausers list little help -
HyDrAtIc - 25.10.2012
PHP код:
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;
}
Re: pausers list little help -
Face9000 - 25.10.2012
Same...
Re: pausers list little help -
Ryz - 23.09.2014
not working :/
Re: pausers list little help -
Rudy_ - 23.09.2014
What? You know what you bumped? 2012 -.-
Re: pausers list little help -
XStormiest - 23.09.2014
Your problem is not related to how you did the command, is related on how you did the Pause check.