Jump to content
  • 0

Probleme cu sistemul de business


Question

Posted (edited)

Problema intalnita (descriere): Pai, atunci cand sunt pe server HARD-RP, ma duc la un biz, vreau sa-l iau, dau /buy, pur si simplu spune: "Poti detine 8 business-uri(setate de mine) in acelasi timp.", si defapt nu am niciun biz.
Ero(area / rile) / warning-(ul / urile): You can own 8 businesses at a time.
Liniile de cod / sursa / script-ul(obligatoriu): Va las roleplay.pwn mai jos
Imagini / Video (optional): - 
Ati incercat sa rezolvati singur?: Da nicio rezolvare si astazi il lansez pe host, am facut multe rezolvari la gm dar asta nu reusesc. Mai jos aveti .pwn  EDIT: EquiNox credd ca o sa stii tu deoarece tu l-ai facut

roleplay.pwn

Edited by ImTouchk

11 answers to this question

Recommended Posts

  • 0
Posted

Nu a zis nimeni de rezolvat buguri! Am zis doar de gm ca are bug, ti-am dat .pwn

  • 0
Posted

    else if ((id = Business_Nearest(playerid)) != -1)
    {
        if (Business_GetCount(playerid) >= MAX_OWNABLE_BUSINESSES)
            return SendErrorMessage(playerid, "You can only own %d businesses at a time.", MAX_OWNABLE_BUSINESSES);

        if (BusinessData[id][bizOwner] != 0)
            return SendErrorMessage(playerid, "This business is already owned at the moment.");

        if (BusinessData[id][bizPrice] > GetMoney(playerid))
            return SendErrorMessage(playerid, "You have insufficient funds for the purchase.");

        BusinessData[id][bizOwner] = GetPlayerSQLID(playerid);

        Business_Refresh(id);
        Business_Save(id);

        GiveMoney(playerid, -BusinessData[id][bizPrice]);
        SendServerMessage(playerid, "You have purchased \"%s\" for %s!", BusinessData[id][bizName], FormatNumber(BusinessData[id][bizPrice]));

        ShowPlayerFooter(playerid, "You have ~g~purchased~w~ a business!");
        Log_Write("logs/biz_log.txt", "[%s] %s has purchased business ID: %d for %s.", ReturnDate(), ReturnName(playerid), id, FormatNumber(BusinessData[id][bizPrice]));
    }

acesta este codul(din cmd:buy)

  • 0
Posted

Business_GetCount(playerid)
{
    new
        count = 0;

    for (new i = 0; i != MAX_BUSINESSES; i ++)
    {
        if (BusinessData[bizExists] && Business_IsOwner(playerid, i))
           {
               count++;
        }
    }
    return count;
}

  • 0
Posted

Business_IsOwner(playerid, bizid)
{
    if (!PlayerData[playerid][pLogged] || PlayerData[playerid][pID] == -1)
        return 0;

    if (BusinessData[bizid][bizExists] && BusinessData[bizid][bizOwner] == 99999999 && PlayerData[playerid][pAdmin] > 0)
        return 1;

    if ((BusinessData[bizid][bizExists] && BusinessData[bizid][bizOwner] != 0) && BusinessData[bizid][bizOwner] == PlayerData[playerid][pID])
        return 1;

    return 0;
}

  • 0
Posted (edited)

 if (BusinessData[bizid][bizExists] && BusinessData[bizid][bizOwner] == 99999999 && PlayerData[playerid][pAdmin] > 0)  

asta cred ca este problema.Esti admin si nu te lasa sa detii biz probabil, nu stiu de ce ar fi pusa aceasta conditie. Incearca sa cumperi un biz fara sa fii admin.

Edited by Jamal Alin

Cea mai sigura sursa de facut bani de buzunar in mediul virtual. Inregistreaza-te si pune-te pe treaba !!!

http://www.viespar.ro/?reff=ab8e9d8086304d6136eac03c710238d7

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.