Jump to content
  • 0

eroare admin system


Smulyz

Question

eroarea 

 

C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(304) : warning 203: symbol is never used: "setadmin"
Pawn compiler 3.10.10              Copyright (c) 1997-2006, ITB CompuPhase

Header size:           4424 bytes
Code size:           175064 bytes
Data size:         17121792 bytes
Stack/heap size:      16384 bytes; estimated max. usage=1279 cells (5116 bytes)
Total requirements:17317664 bytes

1 Warning.
[Finished in 1.7s]

 

linia

CMD:setadmin(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 6)
        return SendClientMessage(playerid, 0xB1BFCC80, "Eroare: Nu ai gradul administrativ necesar.");
    
    new id, admin, string[64];
    if(sscanf(params, "ud", id, admin))
        return SendClientMessage(playerid, 0xB1BFCC80, "SYNTAX: /setadmin <ID/Name> <Admin Level (0-7)>");
    
    if(admin < 0 || admin > 7)
        return SendClientMessage(playerid, -1, "Invalid Admin Level.");
    
    format(string, sizeof(string), "Felicitari! Ai fost promovat la admin %d.", admin);
    SendClientMessage(id, -1, string);
    
    new query[100];
    PlayerInfo[playerid][pAdmin] = admin;
    mysql_format(SQL, query, sizeof(query), "UPDATE `accounts` SET `Admin` = '%d' WHERE `ID` = '%d'", PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSQLID]);
    mysql_tquery(SQL, query);
    
    return 1;
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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.

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