How do I make this command smaller?
#1

Title says It all, I want to make it smaller. Hopefully you know What I mean

Код:
if(strcmp(cmd, "/adminhelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
if (PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 1");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
}
if (PlayerInfo[playerid][pAdmin] == 2)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 2");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
}
if (PlayerInfo[playerid][pAdmin] == 3)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 3");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
}
if (PlayerInfo[playerid][pAdmin] == 4)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 4");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
}
if (PlayerInfo[playerid][pAdmin] == 5)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 5");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 6)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 6");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 7)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 7");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 8)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 8");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname /noooc");
}
if (PlayerInfo[playerid][pAdmin] == 9)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 9");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname /noooc");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 9:");
SendClientMessage(playerid, COLOR_YELLOW, "/logoutall /updateall /noooc /restart /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 10)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 10");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 9:");
SendClientMessage(playerid, COLOR_YELLOW, "/logoutall /updateall /noooc /restart /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 10:");
SendClientMessage(playerid, COLOR_YELLOW, "/tphouse /entercar /joincar /skydive /position /apark /resetmoney /payday");
SendClientMessage(playerid, COLOR_YELLOW, "/asellcar /asellhouse /asellbiz /asellsbiz /givedonation /setstat /bizname");
SendClientMessage(playerid, COLOR_YELLOW, "/sethqstat /setcarstat /sethousestat /setbizstat /setsbizstat /makeadmin");
}
SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
return 1;
}
Reply
#2

Quote:
Originally Posted by Antonio (dominationrp.netii.net)
Title says It all, I want to make it smaller. Hopefully you know What I mean

Код:
if(strcmp(cmd, "/adminhelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
if (PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 1");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
}
if (PlayerInfo[playerid][pAdmin] == 2)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 2");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
}
if (PlayerInfo[playerid][pAdmin] == 3)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 3");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
}
if (PlayerInfo[playerid][pAdmin] == 4)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 4");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
}
if (PlayerInfo[playerid][pAdmin] == 5)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 5");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 6)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 6");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 7)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 7");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 8)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 8");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname /noooc");
}
if (PlayerInfo[playerid][pAdmin] == 9)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 9");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname /noooc");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 9:");
SendClientMessage(playerid, COLOR_YELLOW, "/logoutall /updateall /noooc /restart /bizname");
}
if (PlayerInfo[playerid][pAdmin] == 10)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the admin help center. Your admin level is 10");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 9:");
SendClientMessage(playerid, COLOR_YELLOW, "/logoutall /updateall /noooc /restart /bizname");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 10:");
SendClientMessage(playerid, COLOR_YELLOW, "/tphouse /entercar /joincar /skydive /position /apark /resetmoney /payday");
SendClientMessage(playerid, COLOR_YELLOW, "/asellcar /asellhouse /asellbiz /asellsbiz /givedonation /setstat /bizname");
SendClientMessage(playerid, COLOR_YELLOW, "/sethqstat /setcarstat /sethousestat /setbizstat /setsbizstat /makeadmin");
}
SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
return 1;
}
try dcmd
Reply
#3

You know if you wish to be helpful, dont tell me what to do, answer my question.
Reply
#4

One common rule, don't become cheeky when asking for help.

Remember that next time you do.

Not gonna put this into code for you - that's your job - but you could do the following (I am only giving a suggestion for the exact code you have):

First if-clause checking whether pAdmin is greater than 0, but smaller than two -> throw the lines for Admin Level 1 in there.

Second if-clause checking whether pAdmin is greater than one but smaller than three -> throw the lines for Admin Level 2 in there.

And so on.

Also note that everyone will get the first SendClientMessage the way your code is right now:
Код:
SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
Another general advice:

Switch to dcmd/zcmd.

And one more to end with:

Completely recode this command and make it more dynamic.
Reply
#5

Im making the script more dynamic, completely re-doing it, but I dont wanna make this dynamic just yet.
Reply
#6

I can only advice you to do this before you continue. Maybe it doesn't suit this specific example, but it's hell annoying to recode something in a better way after a period of time (when you already forgot half about the actual code) than coding something properly in the first place .
Reply
#7

I just prefer using the original scripting, I mean I don't load up on variables and shit, but when I'm finished re-doing this script, it will be up to date, believe me
Reply
#8

Use ||'s in the if statements so that way level 1 commands wouldn't have to be writen multiple times for higher levels, if you know what i mean, this would prob decrease that command to about half the length...

Quote:

I just prefer using the original scripting,

sure! use out-dated material that is more complicated and slower! good idea.
Reply
#9

pawn Код:
if(strcmp(cmd, "/adminhelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
    if ( ! PlayerInfo[playerid][pAdmin] ) return 1;
   
    SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
   
    new imstring[128];
    format ( imstring, sizeof(imstring)-1, "Welcome to the admin help center. Your admin level is %d", PlayerInfo[playerid][pAdmin] );
    SendClientMessage(playerid, COLOR_GREEN, imstring);
   
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 1:");
        SendClientMessage(playerid, COLOR_YELLOW, "/admin /mute /mutelist /kick /endallvote");
    }
    if (PlayerInfo[playerid][pAdmin] >= 2)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 2:");
        SendClientMessage(playerid, COLOR_YELLOW, "/akill /rescar /cnn /spec");
    }
    if (PlayerInfo[playerid][pAdmin] >= 3)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 3:");
        SendClientMessage(playerid, COLOR_YELLOW, "/ps /ajail /unjail");
    }
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 4:");
        SendClientMessage(playerid, COLOR_YELLOW, "/freeze /thaw /slap");
    }
    if (PlayerInfo[playerid][pAdmin] >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 5:");
        SendClientMessage(playerid, COLOR_YELLOW, "/goto /stats /disarm /bizname");
    }
    if (PlayerInfo[playerid][pAdmin] >= 6)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 6:");
        SendClientMessage(playerid, COLOR_YELLOW, "/makeleader /removeleader /makemember /getip /aresign /ban /unban /unbanip");
        SendClientMessage(playerid, COLOR_YELLOW, "/warn /unwarn /getwarning /gethere /bizname");
    }
    if (PlayerInfo[playerid][pAdmin] >= 7)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 7:");
        SendClientMessage(playerid, COLOR_YELLOW, "/bigears /house /biz /sbiz /gotohq /gotols /gotolv /gotosf /bizname");
    }
    if (PlayerInfo[playerid][pAdmin] >= 8)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 8:");
        SendClientMessage(playerid, COLOR_YELLOW, "/sethealth /setarmour /bizname /noooc");
    }
    if (PlayerInfo[playerid][pAdmin] >= 9)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 9:");
        SendClientMessage(playerid, COLOR_YELLOW, "/logoutall /updateall /noooc /restart /bizname");
    }
    if (PlayerInfo[playerid][pAdmin] >= 10)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Level 10:");
        SendClientMessage(playerid, COLOR_YELLOW, "/tphouse /entercar /joincar /skydive /position /apark /resetmoney /payday");
        SendClientMessage(playerid, COLOR_YELLOW, "/asellcar /asellhouse /asellbiz /asellsbiz /givedonation /setstat /bizname");
        SendClientMessage(playerid, COLOR_YELLOW, "/sethqstat /setcarstat /sethousestat /setbizstat /setsbizstat /makeadmin");
    }
    SendClientMessage(playerid, COLOR_RED,"*****************************************************************************************************************************");
    return 1;
}
Reply
#10

Thankyou, thats exactly what I was looking for.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)