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.
  • Similar Content

    • By Wreeper
      Salut. M-am gandit de recent sa bag niste culori noi la texte, dar nu vad cum pot sa fac asta. SA:MP e SA:MP si din cauza asta majoritatea culoriilor arata ceva genul asta:
      0xFFC266AA
      M-am gandit ca un destept ce sunt sa pun culoare ROSIE (#FF0000) si sa fac:
      #define RED 0xFFFF0000
      Bineinteles ca e munca Wreepareasca si imi da culoare alba. Din ce cauza? Ce convertor exista sa fac asemenea culori?
    • By RoPe
      Salutare, 
      Am văzut multi playeri care sunt interesati sa faca bani pe server dar considera ca job-ul nu mai este la moda însă  cred ca se merită dacă nu mă credeți uitați-vă la clipul de jos.
      Dacă doriți și cu alte job-uri scrieti aici în comentarii!
       
    • By xVincenzo
      salut, vreau si eu o comanda de /updates daca se poate!
    • By tache94
      Buna ziua, cum pot rezolva aces bug, mi am dat admin 7 din baza de date, si am dat rr la sv iar la /admins nu apare ca sunt admin, dar eu am admin 7.

      https://imgur.com/mU6e38J
      https://imgur.com/O1yqEy3
       
    • By AlexCelTare
      Salut baieti, am si eu nevoie de putin ajutor, vreau sa fac o comanda, ca atunci cand playerul da /enablemusic sa ii cante muzica in toate locatiile astea. Dar problema e, ca, doar un steram merge, cel de la sfarsit, restul, primele 2, nu se aud deloc.
       
      // playerid
      // url
      // coordonates X Y Z
      // distance

      {
          if (strcmp("/enablemusic", cmdtext, true) == 0)
          {
              PlayAudioStreamForPlayer(playerid, "https://uploadir.com/u/0ggegbx6", -2130.5364,-2061.0081,63.3233, 30.0, 1);
              PlayAudioStreamForPlayer(playerid, "https://uploadir.com/u/57dvvuy7", -2218.7273,-2154.1978,43.6795, 20.0, 1);
              PlayAudioStreamForPlayer(playerid, "https://uploadir.com/u/qvov4zt0", -2197.3599,-2254.3499,30.8057, 20.0, 1);
              return 1;
          }
          return 0;
      }
       
      multumesc!
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.