Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted

SAlutare, am o problema... atunci cand scriu coamanda /givelicense weapon ID nu mi apare niciun mesaj, nu mi apare nimic.. nu mi da licenta... uitati comanda

 

CMD:givelicense(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][pMember] == 12 && PlayerInfo[playerid][pRank] >= 1)
        {
            new x_nr[30],id,sendername[30],giveplayer[30],string[128];
               if(sscanf(params, "s[50]u",x_nr,id))
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/givelicense <License name> <Name/Playerid>");
                SendClientMessage(playerid, COLOR_WHITE, "License: Sailing, Weapon, Flying.");
                return 1;
            }
            if(id == playerid) return SCM(playerid,COLOR_WHITE,"{FFB870}");
            if(strcmp(x_nr,"flying",true) == 0)
            {
                if(IsPlayerConnected(id))
                {
                    if(id != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        GetPlayerName(id, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "* You've given a Flying License to %s.",giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Instructor %s has given you a Flying License.",sendername);
                        SendClientMessage(id, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Instructor %s has given %s a Flying License.",sendername,giveplayer);
                        SendFamilyMessage(12,COLOR_WHITE,string);
                        PlayerInfo[id][pFlyLic] = 1;
                        PlayerInfo[id][pFlyLicT] = 100;
                        new str[256];
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `FlyLic`='1',`FlyLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        PlayerInfo[playerid][pCommands]++;
                        Update(playerid,pCommandsx);
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Commands`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pCommands],PlayerInfo[playerid][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        PlayerInfo[playerid][pLGiven] += 1;
                        Update(playerid, pLGivenx);
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
                    return 1;
                }
            }
            else if(strcmp(x_nr,"sailing",true) == 0)
            {
                if(IsPlayerConnected(id))
                {
                    if(id != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        GetPlayerName(id, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "* You've given a Sailing License to %s.",giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Instructor %s has given you a Sailing License.",sendername);
                        SendClientMessage(id, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Instructor %s has given %s a Sailing License.",sendername,giveplayer);
                        SendFamilyMessage(12,COLOR_WHITE,string);
                        PlayerInfo[id][pBoatLic] = 1;
                        PlayerInfo[id][pBoatLicT] = 100;
                        new str[256];
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `BoatLic`='1',`BoatLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        PlayerInfo[playerid][pCommands]++;
                        Update(playerid,pCommandsx);
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Commands`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pCommands],PlayerInfo[playerid][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        PlayerInfo[playerid][pLGiven] += 1;
                        Update(playerid, pLGivenx);
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
                    return 1;
                }
            }
            else if(strcmp(x_nr,"weapon",true) == 0)
            {
                if(IsPlayerConnected(id))
                {
                    if(id != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[id][pLevel] < 3) return SCM(playerid,COLOR_WHITE,"{FFB870}This player does not have level 5.");
                        if(PlayerInfo[id][pGunLicSuspend] > 0) return SCM(playerid,COLOR_WHITE,"This player have gun license suspended.");
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        GetPlayerName(id, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "* You've given a Weapon License to %s.",giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Instructor %s has given you a Weapon License.",sendername);
                        SendClientMessage(id, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Instructor %s has given %s a Weapon License.",sendername,giveplayer);
                        SendFamilyMessage(12,COLOR_WHITE,string);
                        PlayerInfo[id][pGunLic] = 1;
                        PlayerInfo[id][pGunLicT] = 100;
                        new str[256];
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `GunLic`='1',`GunLicT`='100' WHERE `name`='%s'",PlayerInfo[id][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        PlayerInfo[playerid][pCommands]++;
                        Update(playerid,pCommandsx);
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Commands`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pCommands],PlayerInfo[playerid][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        PlayerInfo[playerid][pLGiven] += 1;
                        Update(playerid, pLGivenx);
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
                    return 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "You are not a instructor.");
            return 1;
        }
    }
    return 1;
}

Posted

Nu ai tabelul din baza de date compatibil cu cel din gm, gen daca in gm ai GunLicence si in baza de date ai GunLic nu o sa iti mearga. Uita-te la UPDATE si vezi ce variabila iti da.

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.