03.10.2011, 03:04
pawn Код:
CMD:enevento(playerid,params[])
{
new pName[MAX_PLAYER_NAME], id, Count = 0, string[64];
for(id = 0; id < MAX_PLAYERS; id++)
{
if(IsPlayerConnected(id) && GetPlayerVirtualWorld(id) == 9)
{
Count++;
GetPlayerName(id, pName, MAX_PLAYER_NAME);
if(Count == 1)
{
format(string, sizeof(string), "(ID: %d) (Name: %s)", id, pName);
}
else format(string, sizeof(string),"%s, (ID: %d) (Name: %s)", string, id, pName);
}
}
if(Count == 0) SendClientMessage(playerid, -1, "No hay personas en el evento!");
else SendClientMessage(playerid, -1, string);
return 1;
}