[VanREAL] Posted April 29, 2020 Report Share Posted April 29, 2020 Salut, cine imi poate da comanda [/players] ? Comanda aceea trebuie sa zica cati playeri sunt online pe server. Mersi ! Quote Link to comment Share on other sites More sharing options...
0 VLM Posted April 29, 2020 Report Share Posted April 29, 2020 De ce ai avea nevoie de aceasta comanda cand te poti uita mai simplu in tab... Consumi linii degeaba. Quote #retras Link to comment Share on other sites More sharing options...
0 [VanREAL] Posted April 30, 2020 Author Report Share Posted April 30, 2020 VLM as avea nevoie pt cei de pe android comanda aceasta. Quote Link to comment Share on other sites More sharing options...
0 BaFFyJunior Posted April 30, 2020 Report Share Posted April 30, 2020 (edited) Fa asa daca folosesti foreach: new string[600]; foreach(new i: Player) { format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score); } ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" ); Inlocuieste dialognoresponse cu un dialog pe care il ai care nu raspunde(nu afiseaza) cu nimic cand apesi pe OK. In loc de Score pui variabila prin care iei scorul jucatorului/levelul. Daca nu ai foreach: new string[600]; for(new i, j = GetMaxPlayers(); i < j; i++) { if(!IsPlayerConnected(playerid)) continue; format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score); } ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" ); Edited April 30, 2020 by BaFFyJunior Quote Link to comment Share on other sites More sharing options...
0 [VanREAL] Posted May 2, 2020 Author Report Share Posted May 2, 2020 On 4/30/2020 at 1:30 AM, BaFFyJunior said: Fa asa daca folosesti foreach: new string[600]; foreach(new i: Player) { format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score); } ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" ); Inlocuieste dialognoresponse cu un dialog pe care il ai care nu raspunde(nu afiseaza) cu nimic cand apesi pe OK. In loc de Score pui variabila prin care iei scorul jucatorului/levelul. Daca nu ai foreach: new string[600]; for(new i, j = GetMaxPlayers(); i < j; i++) { if(!IsPlayerConnected(playerid)) continue; format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score); } ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" ); si ce comanda pun ca sa arate chestia asta Quote Link to comment Share on other sites More sharing options...
0 BaFFyJunior Posted May 3, 2020 Report Share Posted May 3, 2020 Acum 14 ore, [VanREAL] a spus: si ce comanda pun ca sa arate chestia asta Pai asta e comanda... CMD:players(playerid, params[]) { new string[600]; foreach(new i: Player) { format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score); } ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" ); return 1; } Quote Link to comment Share on other sites More sharing options...
0 Hackeru Suprem Posted November 1, 2023 Report Share Posted November 1, 2023 CMD:players(playerid, params[]) { new onlinePlayers = 0; for (new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { onlinePlayers++; } } format(string, sizeof(string), "There are %d players online.", onlinePlayers); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } Quote Link to comment Share on other sites More sharing options...
Question
[VanREAL]
Salut, cine imi poate da comanda [/players] ?
Comanda aceea trebuie sa zica cati playeri sunt online pe server.
Mersi !
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.