Jump to content

Catalin Soare

Membru
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Catalin Soare

  1. Acum 16 ore, StrikerM a spus:

    Nu ai explicat asta, ok, da-mi comanda de /buybiz sau comanda cu care tu cumperi un biz.

    YCMD:buybiz(playerid, params[], help) {
        new id, szQuery[256], newmoneys, moneys, string[256];
        if(PlayerInfo[playerid][pBizz] != 255) return SCM(playerid, COLOR_WHITE, "Ai deja un biz! Foloseste /sellbiztostate pentru a-l vinde.");
        for(new b = 1; b < sizeof(BizzInfo); b++) {
            if(PlayerToPoint(2.0, playerid, BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]) && BizzInfo[bBuyPrice] != 0) {
                if(PlayerInfo[playerid][pLevel] < BizzInfo[bLevel]) {
                    format(string, sizeof(string), "Ai nevoie de nivel %d pentru a cumpara.",BizzInfo[bLevel]);
                    SCM(playerid, COLOR_WHITE, string);
                    return 1;
                }
                if(GetPlayerCash(playerid) < BizzInfo[bBuyPrice]) return SCM(playerid, COLOR_GREY, "Nu ai destui bani pentru a face asta.");
                id = GetPlayerID(BizzInfo[bOwner]);
                if(id != INVALID_PLAYER_ID) {
                    PlayerInfo[id][pBizz] = 255;
                    Update(id, pBizzx);
                    PlayerInfo[id][pAccount] += BizzInfo[bBuyPrice];
                    format(string, sizeof(string), "* %s ti-a cumparat afacerea pentru {19CF2E}$%s{239931}. Banii au fost transferati in contul tau bancar.", GetName(playerid), FormatNumber(BizzInfo[bBuyPrice]));
                    SCM(id, 0x239931FF, string);
                    format(szQuery,sizeof(szQuery),"UPDATE users SET `Bank`='%d' WHERE `ID`='%d'",PlayerInfo[id][pAccount],PlayerInfo[id][pSQLID]);
                    mysql_query(SQL,szQuery);                    
                }
                else {
                    format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `name` = '%s'", BizzInfo[bOwner]);
                    new Cache: result = mysql_query(SQL, szQuery);
                    if(cache_get_row_count() != 0) {
                        cache_get_field_content(0, "Bank", string); moneys = strval(string);
                        newmoneys = moneys + BizzInfo[bBuyPrice];
                    }
                    cache_delete(result);
                    format(szQuery, sizeof(szQuery), "UPDATE `users` SET `Bank` = '%d', `Bizz` = '255' WHERE `name` = '%s'", newmoneys, BizzInfo[bOwner]);
                    mysql_tquery(SQL, szQuery, "", "");
                }                
                PlayerInfo[playerid][pBizz] = b;
                BizzInfo[bOwned] = 1;
                format(BizzInfo[bOwner], 256, GetName(playerid));            
                GivePlayerCash(playerid,-BizzInfo[bBuyPrice]);
                BizzInfo[bBuyPrice] = 0;
                format(szQuery,sizeof(szQuery),"UPDATE users SET `Money`='%d',`Bizz`='%d' WHERE `ID`='%d'",GetPlayerCash(playerid),PlayerInfo[playerid][pBizz],PlayerInfo[playerid][pSQLID]);
                mysql_query(SQL,szQuery);
                format(szQuery,sizeof(szQuery),"UPDATE `bizz` SET `Owned`='1',`Owner`='%s',`BuyPrice`='0' WHERE `ID`='%d'",BizzInfo[bOwner],b);
                mysql_query(SQL,szQuery);
                UpdateLabel(2,b);
                finishAchievement(playerid, 2);    
                SCM(playerid, COLOR_MONEY, "Felicitari! Ai cumparat aceasta afacere.");
            }
        }
        return 1;
    }

  2.     format(string, sizeof(string), "Name: %s (ID %d) | Playing Hours: %0.2f | Money: $%s | Bank: $%s | Phone: %d | Referral ID: %d ", GetNameEx(targetid), targetid, PlayerInfo[targetid][pConnectTime], FormatNumber(cash),FormatNumber(account), pnumber, PlayerInfo[targetid][pSQLID]);
        SCM(playerid, COLOR_WHITE,string);
        format(string, sizeof(string), "Level: %d | Respect Points: %d/%d | Next Level: $%s | Premium Account: %s | VIP Account: %s |  Diamonds: {33FFFF}%d", level,exp,expamount,FormatNumber(costlevel),drank,vtext,PlayerInfo[targetid][pPremiumPoints]);
        SCM(playerid, COLOR_WHITE,string);
        format(string, sizeof(string), "Crimes: %d | Arrests: %d | Drugs: %d | Materials: %d | Radio: %s | Rob: %d/10 | Escape: %d/20 | Spin Points: %d", crimes,arrests,drugs,mats,radios, rob,PlayerInfo[targetid][pEscapePoints], PlayerInfo[targetid][pSpinPoints]);
        SCM(playerid, COLOR_WHITE,string);
        format(string, sizeof(string), "Job: %s | Faction: %s | Faction Warns: %d/3 | Faction Punish: %d/20 | Warns: %d/3 | Apartament ID: %d | Treasure Points: %d",jtext,ttext,PlayerInfo[targetid][pFACWarns],PlayerInfo[targetid][pFpunish],warn, have_apartament(playerid), PlayerInfo[targetid][pTreasurePoints]);
        SCM(playerid, COLOR_WHITE,string);
        
        if(clan != 0) {
            if(PlayerInfo[targetid][pClanRank] < 6) format(string, sizeof(string), "Clan: %s (ID %d) | Tag: %s | Rank: %d | Clan Warns: %d/3", ClanInfo[clan][clName], clan, ClanInfo[clan][clTag], PlayerInfo[targetid][pClanRank], PlayerInfo[targetid][pClanWarn]);
            else format(string, sizeof(string), "Clan: %s (ID %d) | Tag: %s | Rank: %d | Clan Warns: %d/3 | Clan Days: %d", ClanInfo[clan][clName], clan, ClanInfo[clan][clTag], PlayerInfo[targetid][pClanRank], PlayerInfo[targetid][pClanWarn], ClanInfo[clan][clDays]);                        
            SCM(playerid, -1, string);
        }

        if(GetVehicles(targetid) >= 0) {
            format(string, sizeof(string), "Vehicles: %d/%d | ", GetVehicles(targetid), TotalSlots(targetid));
            strcat(infostring, string);        
        }
        if(hkey != 999) {
            if(hkey != 999 && strcmp(GetName(targetid), HouseInfo[hkey][hOwner], true) == 0) format(string, sizeof(string), "House ID: %d | ", hkey);
            else format(string, sizeof(string), "Rent House ID: %d | ", hkey);
            strcat(infostring, string);
        }    
        if(bkey != 255) {
            if(bkey >= 100) format(string, sizeof(string), "Static Business: %d | ", bkey-100);
            else  format(string, sizeof(string), "Business ID: %d | ", bkey);
            strcat(infostring, string);
        }
        if(PlayerInfo[targetid][pAdmin] != 0) {
            format(string, sizeof(string), "Admin Warns: %d/3 | ", PlayerInfo[targetid][pAW]);
            strcat(infostring, string);        
        }        
        if(PlayerInfo[targetid][pHelper] != 0) {
            format(string, sizeof(string), "Helper Warns: %d/3 | ", PlayerInfo[targetid][pHW]);
            strcat(infostring, string);        
        }        
        if(PlayerInfo[targetid][pLeader] != 0) {
            format(string, sizeof(string), "Leader Warns: %d/3 | ", PlayerInfo[targetid][pLW]);
            strcat(infostring, string);        
        }                    
        format(infostring2, strlen(infostring)-1, "%s", infostring);
        SCM(playerid, -1, infostring2);

  3. La 10.03.2020 la 20:44, StrikerM a spus:

    Bizul 0 adica nici un biz, daca iti cumperi un biz si inca zice bizul 0 in /stats, inseamna ca la comanda /stats nu exista variabila ce determina daca tu ai sau nu un biz.

    Lasa comanda /stats aici si ma uit sa vad ce este gresit.

    Imediat

×
×
  • 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.