06.01.2017, 16:46
Uh how do I make so when the admin type a command it will show a dialog for all players? I mean.. how do I define playerersid as all players so I can use that to show the dialog.
CMD:credits(playerid, params[]) { new creditt; for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pAdministrator] == 0) { SendClientMessage(i, -1, "Multumesc ca ati jucat pe server, Andrei."); strcat(creditt, "Serverul a scapat de sub control si a devenit un total Deathmatch.\n"); strcat(creditt, "Am incerc sa il schimb in bine dar se pare ca nu se poate.\n"); strcat(creditt, "Si se pare ca la administratori le place sa dea arme la playeri.\n"); strcat(creditt, "Credits: Andrei - Scripting (Skype: andreiwow2).\n"); strcat(creditt, "Credits: Dom - Mapping.\n"); strcat(creditt, "Credits: Predator69 - Host.\n"); strcat(creditt, "Credits: Werty. - Host forum .\n"); strcat(creditt, "Credits: PiNNgu - A ajutat cu privirea\n"); ShowPlayerDialog(playerid, 20312, DIALOG_STYLE_MSGBOX, "Credits", creditt, "LOVE", ""); } else { SendClientMessage(i, -1, "Multumesc ca ati jucat pe server, Andrei.); strcat(creditt, "Serverul a scapat de sub control si a devenit un total Deathmatch.\n"); strcat(creditt, "Am incerc sa il schimb in bine dar se pare ca nu se poate.\n"); strcat(creditt, "Si se pare ca la administratori le place sa dea arme la playeri.\n"); strcat(creditt, "Credits: Andrei - Scripting (Skype: andreiwow2).\n"); strcat(creditt, "Credits: Dom - Mapping.\n"); strcat(creditt, "Credits: Predator69 - Host.\n"); strcat(creditt, "Credits: Werty. - Host forum .\n"); strcat(creditt, "Credits: PiNNgu - A ajutat cu privirea\n"); ShowPlayerDialog(playerid, 20312, DIALOG_STYLE_MSGBOX, "Credits", creditt, "LOVE", ""); } } return 1; }
new creditt[500]; |
ShowPlayerDialog(playerid
ShowPlayerDialog(i
SendClientMessage(i, -1, "Multumesc ca ati jucat pe server, Andrei.");
I wouldn't want a dialog to suddenly appear in my screen displaying the credits if I was a player, honestly. If someone was interested, they could just execute the command anytime they want.
As for the code, there's no difference so far. If the text is the same no matter if a player is admin or not, then use strcat before the loop. In the else statement, you forgot a quotation mark too: Код:
SendClientMessage(i, -1, "Multumesc ca ati jucat pe server, Andrei."); |
ShowPlayerDialog(i, 20312, DIALOG_STYLE_MSGBOX, "Credits", creditt, "LOVE", "");
for(new i = 0; i < MAX_PLAYERS; i++)
for (new i, j = GetPlayerPoolSize(); i <= j; i++) if (IsPlayerConnected(i))