Jump to content

EstiFondator


Recommended Posts

Cum ma pot conecta ca fondator adica la gm-ul meu nu pot sa fac pe cineva mai mare de a4 decat daca sunt fondator ..

CMD:setadmin(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 6 || EstiFondator(playerid))
        {
            new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200];
            if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/setadmin <Name/Playerid> <Admin Level>");
            if(PlayerInfo[id][pAdmin] >= 6 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti modifica admin level-ul unui admin 6+!.");
            if(adminlevel > 4 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only founders can make admin higher than 4.");
            if(IsPlayerConnected(id))
            {
                if(id != INVALID_PLAYER_ID)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
                    format(string, sizeof(string), "You've been promoted to level %d admin, by %s.", adminlevel, sendername);
                    SendClientMessage(id, COLOR_YELLOW, string);
                    format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "* Admin %s set %s's admin level to %d.", sendername,giveplayer,adminlevel);
                    ABroadCast(COLOR_ADMIN,string,1);
                    HLChat(COLOR_ADMCHAT,string);
                    mysql_real_escape_string(string, escape);
                    PlayerInfo[id][pAdmin] = adminlevel;
                    if(adminlevel == 0)
                    {

 

-- Poate imi puteti explica si mie cum sa ma setez ca fondator

Link to comment
Share on other sites

Nu cred ca e bine ... Mi-am pus numele Rollercaster si nu merge.. Trebuia un restart la svr?

public EstiFondator(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new nume[512];
        GetPlayerName(playerid, nume, sizeof(nume));
        if((strcmp(nume, "Rollercaster", true) == 0))
        {
            return 1;
        }
    }
    return 0;
}

Link to comment
Share on other sites

5 minutes ago, kenveloo said:

Nu cred ca e bine ... Mi-am pus numele Rollercaster si nu merge.. Trebuia un restart la svr?

public EstiFondator(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new nume[512];
        GetPlayerName(playerid, nume, sizeof(nume));
        if((strcmp(nume, "Rollercaster", true) == 0))
        {
            return 1;
        }
    }
    return 0;
}

Trebuie sa compilezi, sa pui amx pe host si sa dai restart.

Link to comment
Share on other sites

  • Mister locked this topic
Guest
This topic is now closed to further replies.
  • 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.