08.03.2016, 14:54
Hello, I'd like your help, I need to do to show all players who are online dialogue, but only one ID is displayed in the dialogue, knows someone advice?
Код:
stock ReturnPlayerName(playerid) { new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); return pname; } stock GetOnLinePlayers() { new OnLine; for(new i, g = GetMaxPlayers(); i < g; i++) { if(IsPlayerConnected(i)) OnLine++; } return OnLine; } CMD:checkall(playerid, params[]) { new string[200]; new string1[30]; new count=1; format(string1,sizeof(string1),"Online ( %i )", GetOnLinePlayers()); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new Country1[30], City1[30], IP1[30]; GetPlayerCountry(playerid, Country1); GetPlayerCity(playerid, City1); GetPlayerIp(playerid,IP1,sizeof(IP1)); format(string,sizeof(string),"* %s ( ID %i ) [ IP: %s | State: %s | City: %s ]\n\n", GetPlayerName(i), i, IP1, Country1, City1); count++; } } ShowPlayerDialog(playerid, DIALOG_LOC, DIALOG_STYLE_MSGBOX , string1, string, "Cancel", ""); return 1; }