29.09.2018, 20:23
Hello, today I've started making a DM arenas script, and it will have like 8 arenas on it. I want to make a system to count players from arenas and show it on a dialog, here's how i want it:
So, how do i count players from Las Venturas Police Department and show to the player how players are there,
same for Big Smoke, count all players online in that arena and show it to the player on the dialog..
NOTICE: I don't want to count players in all arenas, i want to count people from each arena if you get what im saying.
PHP код:
new InDM[MAX_PLAYERS];
PHP код:
CMD:dm(playerid, params[])
{
new arenas[1000], string[1000];
if(InDM[playerid]) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are already in a DM arena, do /lobby first.");
format(string, sizeof(string), "{11799C}ID\t{11799C}Name\t{11799C}Players Online\n"); strcat(arenas, string);
format(string, sizeof(string), "{9C9C9C}0\t{9C9C9C}Las Venturas Police Department\t%d players here\n", WHAT DO I DO HERE"); strcat(arenas, string);
format(string, sizeof(string), "{9C9C9C}1\t{9C9C9C}Big Smoke's Crack Factory\t%dplayers here\n" WHAT DO I DO HERE); strcat(arenas, string);
Dialog_Show(playerid, DIALOG_DM, DIALOG_STYLE_TABLIST_HEADERS, "DM Arenas List", arenas, "Enter", "Close");
return 1;
}
same for Big Smoke, count all players online in that arena and show it to the player on the dialog..
NOTICE: I don't want to count players in all arenas, i want to count people from each arena if you get what im saying.