Jump to content
  • 0

Problema comanda /Sell


xt3z0ne

Question

Deci am facut comanda /sell

Iar cand dau /sell la o casa si vreau sa cumpar alta spune ca " You already have a house "

Cum pot sa rezolv problema..

CMD:sell(playerid,params[])
{
    new str1[80], hID = GetHouseID(playerid);
    //--------------------------------------------------------------------------
    format(str1, 80, "Houses/hi%d", hID);
    //--------------------------------------------------------------------------
    if(strcmp(hInfo[hID][Name], PlayerName2(playerid), false) && !IsPlayerAdmin(playerid) ) return
    SendClientMessage(playerid, red, "You already have a house!");
    //--------------------------------------------------------------------------
    SendClientMessage(playerid, yellow, "You left the house!");
    //--------------------------------------------------------------------------
    AccInfo[playerid][Coins] += hInfo[hID][Sell];
    dini_Set(str1, "Name", "ForSale");
    hInfo[hID][Locked] = dini_IntSet(str1,"Locked",1);
    format(hInfo[hID][Name], 255 ,"ForSale");
    //--------------------------------------------------------------------------
    format(str1, 80, "Houses/Users/%s.house", PlayerName2(playerid));
    if(!dini_Exists(str1))
    {
        dini_Remove(str1);
    }
    dini_IntSet(str1, "hi", -255);
    DestroyPickup(HousePickup[hID]);
    houseup(hID, hInfo[hID][iconx], hInfo[hID][icony], hInfo[hID][iconz]);
    HousePickup[hID] = CreatePickup(1273, 23, hInfo[hID][iconx], hInfo[hID][icony], hInfo[hID][iconz]);
    return 1;
}

Help

Sunt un retardat

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

if(strcmp(hInfo[hID][Name], PlayerName2(playerid), false) == 0 && !IsPlayerAdmin(playerid) ) return SendClientMessage(playerid, red, "You already have a house!");

Voi incerca sa fac cum mia-ti dat sa vedem daca merge.

Revin cu edit:

Sunt un retardat

Link to comment
Share on other sites

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.