SHOW:
|
|
- or go back to the newest paste.
1 | public OnPlayerCommandText(playerid, cmdtext[]) | |
2 | ||
3 | { | |
4 | dcmd(admins, 6, cmdtext); | |
5 | return 0; | |
6 | } | |
7 | ||
8 | dcmd_admins(playerid, params[]) | |
9 | { | |
10 | SendClientMessage(playerid, COLOR_YELLOW, "Online admins:"); | |
11 | new chose; | |
12 | for(new i=0;i<MAX_PLAYERS;i++) | |
13 | { | |
14 | if(PInfo[i][Level] > 1) | |
15 | { | |
16 | new name[60], string[100]; | |
17 | GetPlayerName(i, name, 60); | |
18 | - | format(string, 100, "%s[%i] Level: %i", name, i, PInfo[i][Level]); |
18 | + | format(string, sizeof(string), "%s[%i] Level: %i", name, i, PInfo[i][Level]); |
19 | - | SendClientMessage(playerid, COLOR_WHITE, string); |
19 | + | strcat(string, |
20 | chose = 1; | |
21 | strcat(holder, string, sizeof(holder)); | |
22 | ShowPlayerDialog(playerid, 236, DIALOG_STYLE_MSGBOX, "Online Admins List", string, "Close", ""); | |
23 | } | |
24 | } | |
25 | - | SendClientMessage(playerid, COLOR_WHITE, "No administrators online!"); |
25 | + | |
26 | { | |
27 | ShowPlayerDialog(playerid, 236, DIALOG_STYLE_MSGBOX, "Online Admins List", "No Administrators Online!", "Close", ""); | |
28 | } | |
29 | return 1; | |
30 | #pragma unused params | |
31 | } |