17.04.2017, 17:40
I'm trying to script, when I press Next admin lvl 6 should see admin lvl 5 cmds and so on, and here is my code:
Thanks
PHP код:
COMMAND:acmds(playerid, params[])
{
if(playerData[playerid][playerLoggedIn])
{
if(playerData[playerid][playerLevel] == 1)
{
new string[1400];
strcat(string, "{51FF00}/goto | /aod | /kick | /jail | /asay | /spawn | /slap | /warn | /freeze | /unfreeze | /playstats\n");
strcat(string, "{51FF00}/spec | /specoff | /rarb");
ShowPlayerDialog(playerid, DIALOG_ADMIN_LEVEL1, DIALOG_STYLE_MSGBOX, "{98B0CD}Admin Level 1 Commands", string, "Okay", "Next");
return 1;
}
else if (playerData[playerid][playerLevel] == 2)
{
new string[1400];
strcat(string, "{51FF00}/alog | /explode | /vrespawn | /duel | /mute | /unmute | /playerweapons | /arenas | /clearchat\n");
strcat(string, "{51FF00}/blockreport | /blockask");
ShowPlayerDialog(playerid, DIALOG_ADMIN_LEVEL2, DIALOG_STYLE_MSGBOX, "{98B0CD}Admin Level 2 Commands", string, "Okay", "Next");
return 1;
}
else if (playerData[playerid][playerLevel] == 3)
{
new string[1400];
strcat(string, "{51FF00}/ban | /vc | /getpforevent | /unfreezeall | /setskin | /vdestroy | /get | /vgoto | /vbring | /resetweapons\n");
strcat(string, "{51FF00}/forcerules | /forcecoptutorial | /aheal | /playertokens | /playervehicles | /playerjailtime | /playerjob");
ShowPlayerDialog(playerid, DIALOG_ADMIN_LEVEL3, DIALOG_STYLE_MSGBOX, "{98B0CD}Admin Level 3 Commands", string, "Okay", "Next");
return 1;
}
else if (playerData[playerid][playerLevel] == 4)
{
new string[1400];
strcat(string, "{51FF00}/unban | /uncopban | /copban | /gspy | /resetskin | /getip | /countdown | /respawnalluv | /unarmyban | /armyban\n");
strcat(string, "{51FF00}/destroyallav | /announce | /ffaevent | /startffa | /destroyffa | /pmspy | /dmevent | /startdm | /glassevent\n");
strcat(string, "{51FF00}/startglass | /destroyglass | /falloutevent | /startfallout | /destroyfallout | /cvrevent | /startcvr | /lmsevent\n");
strcat(string, "{51FF00}/destroylms | /adkill | /uncuff");
ShowPlayerDialog(playerid, DIALOG_ADMIN_LEVEL4, DIALOG_STYLE_MSGBOX, "{98B0CD}Admin Level 4 Commands{FFFFFF}", string, "Okay", "Next");
return 1;
}
else if (playerData[playerid][playerLevel] == 5)
{
new string[1400];
strcat(string, "{51FF00}/ahealall | /cwspy | /createhouse | /deletehouse | /giveweapon | /respawnallv | /resetallweapons | /gotocase\n");
strcat(string, "{51FF00}/startcase | /houseinfo");
ShowPlayerDialog(playerid, DIALOG_ADMIN_LEVEL5, DIALOG_STYLE_MSGBOX, "{98B0CD}Admin Level 5 Commands{FFFFFF}", string, "Okay", "Next");
return 1;
}
else if (playerData[playerid][playerLevel] == 6)
{
new string[1400];
strcat(string, "{51FF00}/teleport | /giveallweapon | /doublexp | /motd(1-3) | /ping | /fine | /playerhouses | /standardvip | /silvervip\n");
strcat(string, "{51FF00}/goldvip | /givetoken | /givecash | /givexp | /b | /pingimmune | /set");
ShowPlayerDialog(playerid, DIALOG_ADMIN_LEVEL6, DIALOG_STYLE_MSGBOX, "{98B0CD}Admin Level 6 Commands{FFFFFF}", string, "Okay", "Next");
return 1;
}
return 1;
}
return 0;
}