Jump to content
  • 0

YCMD:admins


Rafaly

Question

Salutare! As dorii sa aflu si eu cum as putea sa creez un Tag permanent pentru admini sau / si vipi.(Fondator NUME: Salut,Owner: NUME : Salut)si cum pot adauga la comanda admins rankul fiecarui nivel de admin in parte!

Va las aici comanda sa va fie mai usor.Multumesc anticipat !

YCMD:admins(playerid, params[], help) {
    new string[128];
    format(string, sizeof(string), "---------------- Admini conectati ----------------");
    SCM(playerid, COLOR_SERVER, string);
    if(PlayerInfo[playerid][pAdmin] < 1) {
        foreach(PlayerAdmins, i) {
            if(PlayerInfo[pScripter] > 0) format(string, sizeof(string), "(%d) %s - %s", i, PlayerInfo[pUsername], PlayerInfo[pAdmin] < 8 ? ("Scripter") : ("Fondator"));
            format(string, sizeof(string), "(%d) %s - admin level %d", i, PlayerInfo[pUsername], PlayerInfo[pAdmin]);
            SCM(playerid, -1, string);
        }
    }
    else {
        foreach(PlayerAdmins, i) {
            if(GetPVarInt(i, "Cover") == 1) format(string, sizeof(string), "(%d) %s - admin level %d [afk: %d] [cover: %s]", i, PlayerInfo[pUsername], PlayerInfo[pAdmin], AFKSeconds, GetName(i));
            else if(Spectate != 255) format(string, sizeof(string), "(%d) %s - admin level %d [afk: %d] [spec: %s]", i, PlayerInfo[pUsername], PlayerInfo[pAdmin], AFKSeconds, GetName(Spectate));
            else format(string, sizeof(string), "(%d) %s - admin level %d [afk: %d]", i, PlayerInfo[pUsername], PlayerInfo[pAdmin], AFKSeconds);
            SCM(playerid, -1, string);
        }        
    }
    SCM(playerid, COLOR_SERVER, "--------------------------------------------------------");
    SCM(playerid, COLOR_WHITE, "Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");    
    SCM(playerid, COLOR_SERVER, "--------------------------------------------------------");
    return true;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Cu o functie simpla.
 

stock GetRankAdmin( rank )
{
    new Rankname[ 55 ];

    switch( rank )
    {
        case 0: Rankname = "Player";
        case 1: Rankname = "Junior-Admin";
        case 2: Rankname = "Senior-Admin";
        case 3: Rankname = "Head Admin";
        case 4: Rankname = "Master-Admin";
        case 5: Rankname = "Co-Fondator";
        case 6: Rankname = "Fondator";
        case 7: Rankname = "Scripter";
    }
    return ( Rankname ) ;
}

O folosesti in sintaxa asa: GetRankAdmin(PlayerInfo[playerid][pAdmin]). Ex:
 

new string[64];
format(string, sizeof(string), "%s %s a dat 15000$.", GetRankAdmin(PlayerInfo[playerid][pAdmin]), GetName(playerid));

Sper ca te-am ajutat.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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