09.08.2013, 14:32
Код:
COMMAND:acmds(playerid, params[]) { if(PlayerInfo[playerid][AdminLevel] > 0) { new lvl1[200]; format(lvl1, sizeof(lvl1) , ""blue"%s"yellow"\n/spec /(on/off)duty /reports /mytime /asay /wanteds /jailed /frozen /muted /showguns /morning /miniguns", alevels[1]); new lvl2[100]; format(lvl2, sizeof(lvl2), "\n\n"blue"%s"yellow"\n/eject /warn /slap /clearchat", alevels[2]); new lvl3[300]; format(lvl3, sizeof(lvl3), "\n\n"blue"%s"yellow"\n/burn /ip /announce /goto /(un)mute /(un)freeze /setall(weather/time) /akill /car /setmoney", alevels[3]); new lvl4[300]; format(lvl4, sizeof(lvl4), "\n\n"blue"%s"yellow"\n/enable /disable /crash /get /kick /move /healall /armourall /disarmall /ejectall /giveallweapon /set(score/armour/health) /aka", alevels[4]); new lvl5[100]; format(lvl5, sizeof(lvl5), "\n\n"blue"%s"yellow"\n/togping /setadminlevel, /setviplevel, /ban", alevels[5]); new lvl22[300]; strcat(lvl22, lvl1, sizeof(lvl22)); strcat(lvl22, lvl2, sizeof(lvl22)); new lvl33[500]; strcat(lvl33, lvl22, sizeof(lvl33)); strcat(lvl33, lvl3, sizeof(lvl33)); new lvl44[800]; strcat(lvl44, lvl33, sizeof(lvl44)); strcat(lvl44, lvl4, sizeof(lvl44)); new lvl55[900]; strcat(lvl55, lvl44, sizeof(lvl55)); strcat(lvl55, lvl5, sizeof(lvl55)); switch(PlayerInfo[playerid][AdminLevel]) { case 1: ShowPlayerDialog(playerid, CMD_DIALOG, DIALOG_STYLE_MSGBOX, "Admin commands", lvl1, "Ok", ""); case 2: ShowPlayerDialog(playerid, CMD_DIALOG, DIALOG_STYLE_MSGBOX, "Admin commands", lvl22, "Ok", ""); case 3: ShowPlayerDialog(playerid, CMD_DIALOG, DIALOG_STYLE_MSGBOX, "Admin commands", lvl33, "Ok", ""); case 4: ShowPlayerDialog(playerid, CMD_DIALOG, DIALOG_STYLE_MSGBOX, "Admin commands", lvl44, "Ok", ""); case 5: ShowPlayerDialog(playerid, CMD_DIALOG, DIALOG_STYLE_MSGBOX, "Admin commands", lvl55, "Ok", ""); } } else SendClientMessage(playerid, RED, "Your admin level is not high enough for this command"); return 1; }
can any one help