Jump to content

Help! Permisiuni grade


kenveloo

Recommended Posts

  }

    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] >= ?
            {

Link to comment
Share on other sites

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.
 

 

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
Reply to this topic...

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

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