28.09.2013, 12:12
Here are the changes:
Edit: Here is the /elist cmd:
Quote:
pawn Код:
|
Quote:
pawn Код:
|
pawn Код:
CMD:elist(playerid)
{
if(pInfo[playerid][pWSELevel] > 1) return 0;
if(GetPlayerVirtualWorld(playerid) != 1) return SendClientMessage( playerid, COLOR_RED, "[ ! ] You can't use Event Commands in Real World !" );
new bigString[ 512 ] = "{FFFFFF}Players in Event:",
PlayerName[MAX_PLAYER_NAME],
PlayerCount = 0
;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (!IsPlayerConnected(i) || GetPlayerVirtualWorld(i) != 1) continue;
GetPlayerName(i, PlayerName, sizeof(PlayerName));
PlayerCount++;
format(bigString, sizeof(bigString), "%s\n%i)\t%24s\t\t\t(ID: %i)", bigString, PlayerCount, PlayerName, i);
}
if (!PlayerCount) strcat(bigString, "There are no players in the Event");
return ShowPlayerDialog(playerid, 1234, 0, "Players in event", bigString, "Close", "" );
}