24.06.2018, 16:40
PHP код:
COMMAND:acmds(playerid, params[])
{
new string[1028];
if(Player[playerid][Level] < 1) return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}You do not have the permission to use this command!");
////////////////////////////////////////////////////////////////////////
if(Player[playerid][Level] == 1)
{
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Admin Commands Level 1","/getip, /vfix, /accolor, /vnitro, /vrespawn, /aod, /ans(wer), /jaillist, /arules, /ahelp\n/asay, /mute, /unmute, /warn, /goto, /clearchat, /tempban, /kick, /spawn","Close", "");
}
if(Player[playerid][Level] == 2)
{
format(string, sizeof(string), "/getip, /vfix, /accolor, /vnitro, /vrespawn, /aod, /ans(wer), /jaillist, /arules, /ahelp\n");
format(string, sizeof(string), "/asay, /mute, /unmute, /warn, /goto, /clearchat, /tempban, /kick, /spawn\n");
format(string, sizeof(string), "/teleport, /vc, /vdestroy, /respawnalluv, /destroyallav, /tempname, /removename, /jail\n");
format(string, sizeof(string), "/aheal, /aarmour, /forcerules, /playerbank, /get, /permban(acc), /explode, /unjail\n");
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Admin Commands Level 2",string, "Close");
}
if(Player[playerid][Level] == 3)
{
format(string, sizeof(string), "/getip, /vfix, /accolor, /vnitro, /vrespawn, /aod, /ans(wer), /jaillist, /arules, /ahelp\n");
format(string, sizeof(string), "/asay, /mute, /unmute, /warn, /goto, /clearchat, /tempban, /kick, /spawn\n");
format(string, sizeof(string), "/teleport, /vc, /vdestroy, /respawnalluv, /destroyallav, /tempname, /removename, /jail, /unjail\n");
format(string, sizeof(string), "/aheal, /aarmour, /forcerules, /playerbank, /(un)freeze, /get, /permban(acc), /explode\n");
format(string, sizeof(string), "/givemoney, /respawnallv, /setinterior, /setvirtualword, /swapmotd, /settime, /setday, /announce\n");
format(string, sizeof(string), "/gotovehicle, /arenas, /playertokens, /playerjob, /acure, /playerjailtime, /blockreport, /blockask\n");
format(string, sizeof(string), "/slay, /disarm, /giveweapon, /unban\n");
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Admin Commands Level 3",string, "Close");
}
if(Player[playerid][Level] == 4)
{
format(string, sizeof(string), "/getip, /vfix, /accolor, /vnitro, /vrespawn, /aod, /ans(wer), /jaillist, /arules, /ahelp\n");
format(string, sizeof(string), "/asay, /mute, /unmute, /warn, /goto, /clearchat, /tempban, /kick, /spawn\n");
format(string, sizeof(string), "/teleport, /vc, /vdestroy, /respawnalluv, /destroyallav, /tempname, /removename, /jail, /unjail\n");
format(string, sizeof(string), "/aheal, /aarmour, /forcerules, /playerbank, /(un)freeze, /get, /permban(acc), /explode\n");
format(string, sizeof(string), "/givemoney, /respawnallv, /setinterior, /setvirtualword, /swapmotd, /settime, /setday, /announce\n");
format(string, sizeof(string), "/gotovehicle, /arenas, /playertokens, /playerjob, /acure, /playerjailtime, /blockreport, /blockask\n");
format(string, sizeof(string), "/slay, /disarm, /giveweapon, /unban, /setwanted, /givexp, /topdonator, /motd, /alog, /fine, /setskin\n");
format(string, sizeof(string), "/astream, /saveallstats, /faketip, /ping, /teleportevent, /(un)copban, /(un)armyban, /giveallweapon\n");
format(string, sizeof(string), "/disarmall, /(un)freezeevent, /giveeventweapon, /reseteventweapons, /spawneventplayer\n");
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Admin Commands Level 4",string, "Close");
}
if(Player[playerid][Level] == 5)
{
format(string, sizeof(string), "/getip, /vfix, /accolor, /vnitro, /vrespawn, /aod, /ans(wer), /jaillist, /arules, /ahelp\n");
format(string, sizeof(string), "/asay, /mute, /unmute, /warn, /goto, /clearchat, /tempban, /kick, /spawn\n");
format(string, sizeof(string), "/teleport, /vc, /vdestroy, /respawnalluv, /destroyallav, /tempname, /removename, /jail, /unjail\n");
format(string, sizeof(string), "/aheal, /aarmour, /forcerules, /playerbank, /(un)freeze, /get, /permban(acc), /explode\n");
format(string, sizeof(string), "/givemoney, /respawnallv, /setinterior, /setvirtualword, /swapmotd, /settime, /setday, /announce\n");
format(string, sizeof(string), "/gotovehicle, /arenas, /playertokens, /playerjob, /acure, /playerjailtime, /blockreport, /blockask\n");
format(string, sizeof(string), "/slay, /disarm, /giveweapon, /unban, /setwanted, /givexp, /topdonator, /motd, /alog, /fine, /setskin\n");
format(string, sizeof(string), "/astream, /saveallstats, /faketip, /ping, /teleportevent, /(un)copban, /(un)armyban, /giveallweapon\n");
format(string, sizeof(string), "/disarmall, /(un)freezeevent, /giveeventweapon, /reseteventweapons, /spawneventplayer, /setmoney\n");
format(string, sizeof(string), "/setxp, /silvervip, /basicvip, /goldvip, /givetoken, /kickall\n");
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Admin Commands Level 5",string, "Close");
}
if(Player[playerid][Level] >= 6)
{
format(string, sizeof(string), "/getip, /vfix, /accolor, /vnitro, /vrespawn, /aod, /ans(wer), /jaillist, /arules, /ahelp\n");
format(string, sizeof(string), "/asay, /mute, /unmute, /warn, /goto, /clearchat, /tempban, /kick, /spawn\n");
format(string, sizeof(string), "/teleport, /vc, /vdestroy, /respawnalluv, /destroyallav, /tempname, /removename, /jail, /unjail\n");
format(string, sizeof(string), "/aheal, /aarmour, /forcerules, /playerbank, /(un)freeze, /get, /permban(acc), /explode\n");
format(string, sizeof(string), "/givemoney, /respawnallv, /setinterior, /setvirtualword, /swapmotd, /settime, /setday, /announce\n");
format(string, sizeof(string), "/gotovehicle, /arenas, /playertokens, /playerjob, /acure, /playerjailtime, /blockreport, /blockask\n");
format(string, sizeof(string), "/slay, /disarm, /giveweapon, /unban, /setwanted, /givexp, /topdonator, /motd, /alog, /fine, /setskin\n");
format(string, sizeof(string), "/astream, /saveallstats, /faketip, /ping, /teleportevent, /(un)copban, /(un)armyban, /giveallweapon\n");
format(string, sizeof(string), "/disarmall, /(un)freezeevent, /giveeventweapon, /reseteventweapons, /spawneventplayer, /setmoney\n");
format(string, sizeof(string), "/setxp, /silvervip, /basicvip, /goldvip, /givetoken, /kickall\n\n");
format(string, sizeof(string), "{FF0000}/setlevel, /(promote/remove)bouncer, /(promote/remove)helper\n");
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Admin Commands Level 6 - 7",string, "Close");
}
return 1;
}
For example: A level 4 admin using /acmds will only see this line:
Код:
format(string, sizeof(string), "/disarmall, /(un)freezeevent, /giveeventweapon, /reseteventweapons, /spawneventplayer\n");