Jump to content
  • 0

Coamnda /admins pe LuxAdmin sa fie la level x cum fac?


[.E.m.O.]K1DDU

Question

Hi ^^

Cum pot face ca comanda /admins sa mearga sa fie accesata doar de jucatori cu level x (1 sau 2 sau 3 sau 4 sau 5 E.T.C.)

Pe Sistemul de Admin LuxAdmin

Uitati aici Comanda (dcmd_admins) /admins :

[pawn]dcmd_admins(playerid,params[])

{

    #pragma unused params

        new count = 0;

        new string[128];

        new ChangeColor;

  SendClientMessage(playerid, green, " ");

        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");

SendClientMessage(playerid, green, " ");

for(new i = 0; i < MAX_PLAYERS; i++)

{

if (IsPlayerConnected(i))

{

if(AccInfo[Level] >= 2 && AccInfo[Hide] == 0)

{

if(AccInfo[Level] > 5)

{

AdmRank = "Professional Admin";

ChangeColor = Color_Professional_Admin;

}

if(IsPlayerAdmin(i))

  {

  AdmRank = "RCON Administrator";

  ChangeColor = Color_RCON_Administrator;

  }

    else

    {

switch(AccInfo[Level])

{

case 1: {

AdmRank = "Basic Moderator";

ChangeColor = Color_Basic_Moderator;

}

case 2: {

AdmRank = "Moderator";

ChangeColor = Color_Moderator;

}

case 3: {

AdmRank = "Master Moderator";

ChangeColor = Color_Master_Moderator;

}

case 4: {

AdmRank = "Administrator";

ChangeColor = Color_Administrator;

}

case 5: {

AdmRank = "Master Administrator";

ChangeColor = Color_Master_Administrator;

}

}

}

switch(AccInfo[OnDuty])

{

case 0: AdmDuty = "Playing!";

case 1: AdmDuty = "On Duty!";

}

format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[Level], PlayerName2(i),i,AdmRank,AdmDuty);

SendClientMessage(playerid, ChangeColor, string);

count++;

}

}

}

if (count == 0)

SendClientMessage(playerid,red,"No admin online in the list");

SendClientMessage(playerid, green, " _______________________________________");

return 1;

}

[/pawn]

Multumesc anticipat


F*ck everybody who want and who try to judge me for who I am, b*star*s !

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

[pawn]

if(AccInfo[playerid][Level] >= 0)

{

[/pawn]

in loc de 0 pui ce vrei u

dcmd_admins(playerid,params[])

{

     

      if(AccInfo[playerid][Level] >= 0)

      {

        new count = 0;

        new string[128];

        new ChangeColor;

  SendClientMessage(playerid, green, " ");

        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");

SendClientMessage(playerid, green, " ");

for(new i = 0; i < MAX_PLAYERS; i++)

{

if (IsPlayerConnected(i))

{

if(AccInfo[Level] >= 2 && AccInfo[Hide] == 0)

{

if(AccInfo[Level] > 5)

{

AdmRank = "Professional Admin";

ChangeColor = Color_Professional_Admin;

}

if(IsPlayerAdmin(i))

  {

  AdmRank = "RCON Administrator";

  ChangeColor = Color_RCON_Administrator;

  }

    else

    {

switch(AccInfo[Level])

{

case 1: {

AdmRank = "Basic Moderator";

ChangeColor = Color_Basic_Moderator;

}

case 2: {

AdmRank = "Moderator";

ChangeColor = Color_Moderator;

}

case 3: {

AdmRank = "Master Moderator";

ChangeColor = Color_Master_Moderator;

}

case 4: {

AdmRank = "Administrator";

ChangeColor = Color_Administrator;

}

case 5: {

AdmRank = "Master Administrator";

ChangeColor = Color_Master_Administrator;

}

}

}

switch(AccInfo[OnDuty])

{

case 0: AdmDuty = "Playing!";

case 1: AdmDuty = "On Duty!";

}

format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[Level], PlayerName2(i),i,AdmRank,AdmDuty);

SendClientMessage(playerid, ChangeColor, string);

count++;

}

}

}

if (count == 0)

SendClientMessage(playerid,red,"No admin online in the list");

SendClientMessage(playerid, green, " _______________________________________");

return 1;

}

Link to comment
Share on other sites

Asta stiu si eu sa adaug

[pawn] if(AccInfo[playerid][Level] >= 0)

      {[/pawn]

Nu ma gandeam ca va veni cineva si imi va spune la fel sa fac. Imi da 23 Warnuri o.O


F*ck everybody who want and who try to judge me for who I am, b*star*s !

 

 

Link to comment
Share on other sites

Nu conteaza daca sa le arate ca pe RSS sau nu, eu doresc ca comanda /admins sa nu mearga la jucatori doar la admini cu level 1 sau 2 sau 3 sau 4 sau 5. Am facut cum a spus @SonGoKu nu mere imi da un Warning il las in paci intru in joc scriu /admin scrie Nu sunt administratori online scrie normal cum trebuie. Si daca sterg acel Warning tot asa face.............

Cum am spus nu conteaza daca ii ca pe RSS sau nu.


F*ck everybody who want and who try to judge me for who I am, b*star*s !

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.