Jump to content

Question

Posted

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;
}

 

4 answers to this question

Recommended Posts

  • 0
Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.