Jump to content

Question

Posted

ajutati-ma ca la comanda asta YCMD:setadminoff(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, -1, AdminOnly); new id[64], adminlevel, userid, string[200]; if(sscanf(params, "s[64]i", id, adminlevel)) return SendClientMessage(playerid, COLOR_WHITE, "{33CCFF}Sintaxa: {FFFFFF}/setadminoff <Name> <Admin Level>"); new cont = MySQLCheckAccount(id); userid = GetPlayerID(id); if(cont == 0) return SCM(playerid, -1, "Eroare: Acest nume nu a fost gasit in baza de date!"); if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)"); format(string, sizeof(string), "I-ai setat lui %s admin %d.", id, adminlevel); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "AdmCmd: %s i-a setat lui (Offline)%s admin %d.", GetName(playerid), id, adminlevel); if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 6);
PlayerInfo[userid][pAdmin] = adminlevel; return 1; }



o dau pe contul meu test cu admin  5 si cand intra inapoi tot are adminu va rog corectati-o voi ca sa ramana adminul 0 sau cat i-am setat eu nu i ramane adminul asta e  problema

8 answers to this question

Recommended Posts

  • 0
Posted

YCMD:setadminoff(playerid, params[], help) { 
    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, -1, AdminOnly); 
    new id[24], adminlevel, userid, string[200]; 
    if(sscanf(params, "s[24]i", id, adminlevel)) return SendClientMessage(playerid, COLOR_WHITE, "{33CCFF}Sintaxa: {FFFFFF}/setadminoff <Name> <Admin Level>"); 

    new cont = MySQLCheckAccount(id); 
    if(cont == 0) return SCM(playerid, -1, "Eroare: Acest nume nu a fost gasit in baza de date!"); 
    if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)"); 

    format(string, sizeof(string), "I-ai setat lui %s admin %d.", id, adminlevel);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 

    format(string, sizeof(string), "AdmCmd: %s i-a setat lui (Offline)%s admin %d.", GetName(playerid), id, adminlevel); 
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 6); 

    new szQuery[128];
    mysql_format(SQL, szQuery, sizeof(szQuery), "UPDATE `users` SET `Admin`='%d' WHERE `Name`='%s'", adminlevel, id);
    mysql_query(SQL, szQuery);

    return 1; 
}

+1 te rog !

  • Upvote 1
  • 0
Posted
Acum 19 ore, [El.Capo] a spus:

YCMD:setadminoff(playerid, params[], help) { 
    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, -1, AdminOnly); 
    new id[24], adminlevel, userid, string[200]; 
    if(sscanf(params, "s[24]i", id, adminlevel)) return SendClientMessage(playerid, COLOR_WHITE, "{33CCFF}Sintaxa: {FFFFFF}/setadminoff <Name> <Admin Level>"); 

    new cont = MySQLCheckAccount(id); 
    if(cont == 0) return SCM(playerid, -1, "Eroare: Acest nume nu a fost gasit in baza de date!"); 
    if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)"); 

    format(string, sizeof(string), "I-ai setat lui %s admin %d.", id, adminlevel);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 

    format(string, sizeof(string), "AdmCmd: %s i-a setat lui (Offline)%s admin %d.", GetName(playerid), id, adminlevel); 
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 6); 

    new szQuery[128];
    mysql_format(SQL, szQuery, sizeof(szQuery), "UPDATE `users` SET `Admin`='%d' WHERE `Name`='%s'", adminlevel, id);
    mysql_query(SQL, szQuery);

    return 1; 
}

+1 te rog !

gata

  • 0
Posted
On 7/20/2019 at 10:44 AM, AndreiBoss.adevaratu said:

ajutati-ma ca la comanda asta YCMD:setadminoff(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, -1, AdminOnly); new id[64], adminlevel, userid, string[200]; if(sscanf(params, "s[64]i", id, adminlevel)) return SendClientMessage(playerid, COLOR_WHITE, "{33CCFF}Sintaxa: {FFFFFF}/setadminoff <Name> <Admin Level>"); new cont = MySQLCheckAccount(id); userid = GetPlayerID(id); if(cont == 0) return SCM(playerid, -1, "Eroare: Acest nume nu a fost gasit in baza de date!"); if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)"); format(string, sizeof(string), "I-ai setat lui %s admin %d.", id, adminlevel); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "AdmCmd: %s i-a setat lui (Offline)%s admin %d.", GetName(playerid), id, adminlevel); if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 6);
PlayerInfo[userid][pAdmin] = adminlevel; return 1; }



o dau pe contul meu test cu admin  5 si cand intra inapoi tot are adminu va rog corectati-o voi ca sa ramana adminul 0 sau cat i-am setat eu nu i ramane adminul asta e  problema

Smr tu ca mi-ai loat comanda... =]

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.