Jump to content

Cum adaug comanda /bonus si /agl id all ?? Help


LUCYANN22

Recommended Posts

Salut, va rog sa ma ajutati si pe mine cu: 

1. Cum adaug comanda /bonus si sa adaug eu ce suma bani pp level vreau eu.

2. Cum adaug comanda /agl ID all sa dau toate licentele.

Dar va rog daca e gen: 

if(PlayerInfo[playerid][pLevel] == 1)
{
   PlayerInfo[playerid][pMoney] = suma;
   PlayerInfo[playerid][pLevel] = 2;
}

sa ma ajutati ca asa am vazut intr-un topic adica unde bag astea?? cu PlayerInfo? adica stiu ca trebuie in GM dar in ce parte ?? mai jos sau sus sau bag direct asa in gamemode cum am intrat in el?

Edited by LUCYANN22
Link to comment
Share on other sites

Uite /agl

Spoiler

CMD:agl(playerid,params[])
{
    if(PinLogged[playerid] == 0)return SCM(playerid, COLOR_DARKNICERED,"{FFFFFF}{FFFFFF}Contul tau este {ff0000}blocat{ffffff}, foloseste {ff0000}/pin{ffffff} pentru a-l debloca..");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 3)
        {
            new id,x_nr[10],sendername[25],giveplayer[25],string[128];
            if(sscanf(params, "us[10]",id,x_nr))
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/agivelicense <Name/Playerid> <License>");
                SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving, Pilots, Boat, Weapon, ALL.");
                return 1;
            }
            if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GetPlayerName(id, giveplayer, sizeof(giveplayer));
            if(strcmp(x_nr,"driving",true) == 0)
            {
                format(string, sizeof(string), "* I-ai dat lui %s licenta de condus",giveplayer);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* Admin %s ti-a dat licenta de condus.",sendername);
                SendClientMessage(id, COLOR_LIGHTBLUE, string);
                PlayerInfo[id][pCarLic] = 1;
                PlayerInfo[id][pCarLicT] = 100;
                PlayerInfo[id][pCarLicSuspend] = 0;
                Update(id, pCarLicSuspendx);
                new str[128];
                mysql_format(SQL,str,128,"UPDATE users SET `CarLic`='1',`CarLicT`='%s' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else if(strcmp(x_nr,"pilots",true) == 0)
            {
                format(string, sizeof(string), "* I-ai dat lui %s licenta de pilotat.",giveplayer);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* Admin %s ti-a dat licenta de pilotat.",sendername);
                SendClientMessage(id, COLOR_LIGHTBLUE, string);
                PlayerInfo[id][pFlyLic] = 1;
                PlayerInfo[id][pFlyLicT] = 100;
                new str[128];
                mysql_format(SQL,str,128,"UPDATE users SET `FlyLic`='1',`FlyLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else if(strcmp(x_nr,"boat",true) == 0)
            {
                format(string, sizeof(string), "* I-ai dat lui %s licenta de navigat.",giveplayer);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* Admin %s ti-a dat licenta de navigat.",sendername);
                SendClientMessage(id, COLOR_LIGHTBLUE, string);
                PlayerInfo[id][pBoatLic] = 1;
                PlayerInfo[id][pBoatLicT] = 100;
                new str[128];
                mysql_format(SQL,str,128,"UPDATE users SET `BoatLic`='1',`BoatLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else if(strcmp(x_nr,"weapon",true) == 0)
            {
                format(string, sizeof(string), "* I-ai dat lui %s licenta de port-arma.",giveplayer);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* Admin %s ti-a dat licenta de port-arma.",sendername);
                SendClientMessage(id, COLOR_LIGHTBLUE, string);
                PlayerInfo[id][pGunLic] = 1;
                PlayerInfo[id][pGunLicT] = 100;
                PlayerInfo[id][pGunLicSuspend] = 0;
                Update(id, pGunLicSuspendx);
                new str[128];
                mysql_format(SQL,str,128,"UPDATE users SET `GunLic`='1',`GunLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else if(strcmp(x_nr,"all",true) == 0)
            {
                format(string, sizeof(string), "* I-ai dat lui %s toate licentele.",giveplayer);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* Admin %s ti-a dat toate licentele.",sendername);
                SendClientMessage(id, COLOR_LIGHTBLUE, string);
                PlayerInfo[id][pGunLic] = 1;
                PlayerInfo[id][pGunLicT] = 100;
                PlayerInfo[id][pBoatLic] = 1;
                PlayerInfo[id][pBoatLicT] = 100;
                PlayerInfo[id][pFlyLic] = 1;
                PlayerInfo[id][pFlyLicT] = 100;
                PlayerInfo[id][pCarLic] = 1;
                PlayerInfo[id][pCarLicT] = 100;
                PlayerInfo[id][pGunLicSuspend] = 0;
                PlayerInfo[id][pCarLicSuspend] = 0;
                Update(id, pGunLicSuspendx);
                Update(id, pCarLicSuspendx);
                new str[128];
                mysql_format(SQL,str,128,"UPDATE users SET `GunLic`='1',`GunLicT`='100',`BoatLic`='1',`BoatLicT`='100',`FlyLic`='1',`FlyLicT`='100',`CarLic`='1',`CarLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
        }
        
    }
    return 1;
}

 

Link to comment
Share on other sites

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