Jump to content

Recommended Posts

Posted

Vreau ca la comanda /setadmin sa aiba acces si admin 7 si admin 6 adica pe gm ul meu are acces doar admin 8. Cum fac? imi puteti explica sau sa imi dati un tutorial? repede daca se poate

Posted

  }

    if(strcmp(cmd, "/setadmin", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_SERVER, "USAGE:{FFFFFF} /setadmin [playerid] [level(1-8)]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(level < 0 || level > ? return SCM(playerid, COLOR_WHITE, "Level invalid!");
            if(PlayerInfo[playerid][pAdmin] >= ?
            {

Posted

In primul rand, data viitoare cand scrii cod incadreaza-l in code, apoi nu ai pus comanda intreaga. O sa iti explic care ar trebui sa fie linia unde trebuie modificata.

 

if(PlayerInfo[playerid][pAdmin] >= 8)

Inlocuiesti linia respectiva cu

if(PlayerInfo[playerid][pAdmin] >= 6)

iar apoi ar trebui sa fie ok. Repet, nu ai pus toata comanda si textul e aranjat aiurea asa ca verifica si tu atent sa nu fi omis ceva. De asemenea, foloseste zcmd&sscanf, e mai rapid.
 

 

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