Jump to content

Question

21 answers to this question

Recommended Posts

  • 0
Posted

Pune comanda ce era inapoi, compileaza si spune-mi ce vrei sa modifici la ea sau ce nu iti convine la ea.

 

  • 0
Posted
Acum 16 minute, zNx[] a spus:

Pune comanda ce era inapoi, compileaza si spune-mi ce vrei sa modifici la ea sau ce nu iti convine la ea.

Salut, vreau sa modific sa apara pe chat-ul adminilor ca un admin a primit up, sa ii apara si lui si sa mi apara si mie (Gen la fel ca pe gm bigzone), apreciez ca ma ajuti ❤️

  • 0
Posted

YCMD:setadmin(playerid, params[], help) {

    new id, adminlevel, gString[120];

    if(PlayerInfo[playerid][pAdmin] < 6)
        return SCM(playerid, COLOR_WHITE, AdminOnly);

    if(sscanf(params, "ui", id, adminlevel))
        return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setadmin <playerid/name> <Admin Level>");

    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID)
        return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    if(adminlevel < 0 || adminlevel > 6)
        return SCM(playerid, COLOR_GREY, "Invalid admin level. 0-6");

    if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin])
        return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda pe acel player. Are admin level mai mare.");

    format(gString, 80, "Ai fost promovat la admin %d de %s", adminlevel, GetName(playerid));
    SCM(id, COLOR_LIGHTBLUE, gString);

    format(gString, 100, "AdmCmd: %s i-a setat lui %s admin level %d.", GetName(playerid), GetName(id), adminlevel);
    SendAdminHelperMessage(COLOR_LOGS, gString);

    if(adminlevel == 0) {
        PlayerInfo[id][pAW] = 0;
        UpdateVar(id, "AW", 0);
        SpecFaction[id] = 0;
        StopFly(playerid);
        UsedFly[playerid] = 0;
        SetPlayerHealthEx(playerid, 100);

        Iter_Remove(PlayerAdmins, id);
    }

    Iter_Add(PlayerAdmins, id);

    finishAchievement(id, 27);
    PlayerInfo[id][pAdmin] = adminlevel;

    new gQuery[180];

    if(adminlevel >= 1)
        format(gQuery, sizeof(gQuery), "UPDATE users SET `Admin`='%d', `Security`='%s', `HelpedPlayers`='0' WHERE `ID`='%d'", PlayerInfo[id][pAdmin]/*, MD5_Hash(DEFAULT_PASSWORD)*/, PlayerInfo[id][pSQLID]);
    else
        UpdateVar(id, "Admin", PlayerInfo[id][pAdmin]);
    mysql_tquery(SQL, gQuery, "", "");
    SetPVarInt(id, "SecurityPlayer", 0);

    return true;
}

  • 0
Posted
Acum 6 minute, Florin2001 a spus:

Salut, vreau sa modific sa apara pe chat-ul adminilor ca un admin a primit up, sa ii apara si lui si sa mi apara si mie (Gen la fel ca pe gm bigzone), apreciez ca ma ajuti ❤️

Pe randul 1827  dupa >=6 nu ai inchis acolada }

  • 0
Posted

Din comanda, se vede ca mesajele sunt trimise, da-mi o poza din game, atunci cand dai /setadmin pe cineva sau pe tine insuti.

 

  • 0
Posted
Acum 44 minute, Stefano a spus:

am patit si eu problema asta dar am rezolvat-o, am schimbat functia GetName si a mers, da-mi o poza cu functia getname

Nu are legatura cu functia GetName eu personal am facut um edit destul de mare gm-ului si nu am avut probleme nici cu comanda nici cu functia.

  • 0
Posted

da, uite cam ce ar trebui sa inlocuiesti in comanda ta

    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
    new id,adminlevel,string[200];
    if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setadmin <playerid/name> <Admin Level>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    format(string, sizeof(string), "Ai fost promovat la admin %d de %s.", adminlevel, GetName(playerid));
    SendClientMessage(id, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "I-ai setat lui %s admin %d.", GetName(id),adminlevel);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "({FF6347}AdminStaff{FFFFFF}) %s i-a setat lui %s admin %d.", GetName(playerid),GetName(id),adminlevel);
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,4);

  • 0
Posted

Sus la linia 4 pui #define DEFAULT_PASSWORD "PAROLA TA"

Spoiler

CMD:setadmin(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
    new id,adminlevel,string[200];
    if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setadmin <playerid/name> <Admin Level>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)");
    if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_GREY, "Nu poti executa aceasta comanda pe acel player!");

    format(string, sizeof(string), "Ai fost promovat la admin %d de %s.", adminlevel, GetName(playerid));
    SendClientMessage(id, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "I-ai setat lui %s admin %d.", GetName(id),adminlevel);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "AdmCmd: %s i-a setat lui %s admin %d.", GetName(playerid),GetName(id),adminlevel);
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,4);

    if(adminlevel == 0) {
        PlayerInfo[id][pAW] = 0;
        UpdateVar(id, "AW", 0);
        SpecFaction[id] = 0;
        StopFly(playerid);
        UsedFly[playerid] = 0;
        SetPlayerHealthEx(playerid, 99);
        SendClientMessage(playerid, 0xFFADADFF, "Fly mode off.");
    }
    else finishAchievement(id, 27);
    PlayerInfo[id][pAdmin] = adminlevel;

    new query[180];

    if(adminlevel >= 1) format(query,sizeof(query),"UPDATE users SET `Admin`='%d', `Security`='%s',`HelpedPlayers`='0' WHERE `ID`='%d'",PlayerInfo[id][pAdmin], MD5_Hash(DEFAULT_PASSWORD), PlayerInfo[id][pSQLID]);
    else format(query,sizeof(query),"UPDATE users SET `Admin`='%d' WHERE `ID`='%d'",PlayerInfo[id][pAdmin],PlayerInfo[id][pSQLID]);
    mysql_query(SQL,query);
    SetPVarInt(id, "SecurityPlayer", 0);
    return 1;
}

 ACUM +1 =D

COMUNITATEA MEA DE RESURSE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spacer.png
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
www.codeup.ro / www.codeup.ro/forum

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.