[Ajuda] ADM Vender casa
#4

pawn Код:
public OnPropUpdate()
{
    new idx;
    new File: file2;
    new label[256];
    while (idx < sizeof(HouseInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
        HouseInfo[idx][hEntrancex],
        HouseInfo[idx][hEntrancey],
        HouseInfo[idx][hEntrancez],
        HouseInfo[idx][hExitx],
        HouseInfo[idx][hExity],
        HouseInfo[idx][hExitz],
        HouseInfo[idx][hHealthx],
        HouseInfo[idx][hHealthy],
        HouseInfo[idx][hHealthz],
        HouseInfo[idx][hArmourx],
        HouseInfo[idx][hArmoury],
        HouseInfo[idx][hArmourz],
        HouseInfo[idx][hOwner],
        HouseInfo[idx][hDiscription],
        HouseInfo[idx][hValue],
        HouseInfo[idx][hHel],
        HouseInfo[idx][hArm],
        HouseInfo[idx][hInt],
        HouseInfo[idx][hLock],
        HouseInfo[idx][hOwned],
        HouseInfo[idx][hRooms],
        HouseInfo[idx][hRent],
        HouseInfo[idx][hRentabil],
        HouseInfo[idx][hTakings],
        HouseInfo[idx][hVec],
        HouseInfo[idx][hVcol1],
        HouseInfo[idx][hVcol2],
        HouseInfo[idx][hDate],
        HouseInfo[idx][hLevel],
        HouseInfo[idx][hWorld]);

        new h = idx;

        if(HouseInfo[h][hOwned] == 1)
        {
            if(HouseInfo[h][hRentabil] == 0)
            {
                format(label, sizeof(label), "Proprietбrio da casa: %s \nLevel : %d",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
            }
            else
            {
                format(label, sizeof(label), "Proprietбrio da casa: %s \nAluguel: R$ %d - Level : %d \nDigite /alugarquarto para alugar um quarto",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
            }
            Update3DTextLabelText(HouseInfo[h][HouseLabel], COLOR_WHITE, label);
        }
        else if(HouseInfo[h][hOwned] == 0)
        {
            format(label, sizeof(label), "A casa estб a venda \n Descricгo: %s \n Preco: R$ %d - Level : %d\n Para comprar digite /comprarcasa",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
            Update3DTextLabelText(HouseInfo[h][HouseLabel], COLOR_WHITE, label);
        }

        if(idx == 0)
        {
            file2 = fopen("/RPG/logs/property.cfg", io_write);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(BizzInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
        BizzInfo[idx][bOwned],
        BizzInfo[idx][bOwner],
        BizzInfo[idx][bMessage],
        BizzInfo[idx][bExtortion],
        BizzInfo[idx][bEntranceX],
        BizzInfo[idx][bEntranceY],
        BizzInfo[idx][bEntranceZ],
        BizzInfo[idx][bExitX],
        BizzInfo[idx][bExitY],
        BizzInfo[idx][bExitZ],
        BizzInfo[idx][bLevelNeeded],
        BizzInfo[idx][bBuyPrice],
        BizzInfo[idx][bEntranceCost],
        BizzInfo[idx][bTill],
        BizzInfo[idx][bLocked],
        BizzInfo[idx][bInterior],
        BizzInfo[idx][bProducts],
        BizzInfo[idx][bMaxProducts],
        BizzInfo[idx][bPriceProd]);
        if(idx == 0)
        {
            file2 = fopen("/RPG/logs/bizz.cfg", io_write);
        }
        else
        {
            file2 = fopen("/RPG/logs/bizz.cfg", io_append);
        }
        new h = idx;
        if(BizzInfo[h][bOwned] == 0)
        {
            format(label, sizeof(label), "%s\n A empresa estб a venda\n Preco: R$ %d - Level : %d \n Para comprar: /comprarempresa",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
            Update3DTextLabelText(BizzInfo[h][bizzLabel],COLOR_COCONUT, label);
        }
        if(BizzInfo[h][bOwned] == 1)
        {
            format(label, sizeof(label), "%s\nDono: %s\n Extorsгo: %s\n Taxa : R$ %d - Level : %d \n Use /entrar",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
            Update3DTextLabelText(BizzInfo[h][bizzLabel],COLOR_COCONUT, label);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(SBizzInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
        SBizzInfo[idx][sbOwned],
        SBizzInfo[idx][sbOwner],
        SBizzInfo[idx][sbMessage],
        SBizzInfo[idx][sbExtortion],
        SBizzInfo[idx][sbEntranceX],
        SBizzInfo[idx][sbEntranceY],
        SBizzInfo[idx][sbEntranceZ],
        SBizzInfo[idx][sbLevelNeeded],
        SBizzInfo[idx][sbBuyPrice],
        SBizzInfo[idx][sbEntranceCost],
        SBizzInfo[idx][sbTill],
        SBizzInfo[idx][sbLocked],
        SBizzInfo[idx][sbInterior],
        SBizzInfo[idx][sbProducts],
        SBizzInfo[idx][sbMaxProducts],
        SBizzInfo[idx][sbPriceProd]);
        if(idx == 0)
        {
            file2 = fopen("/RPG/logs/sbizz.cfg", io_write);
        }
        else
        {
            file2 = fopen("/RPG/logs/sbizz.cfg", io_append);
        }
        new h = idx;
        if(SBizzInfo[h][sbOwned] == 0)
        {
            format(label, sizeof(label), "%s\nA empresa estб a venda\nPreco: R$ %d - Level : %d \nPara comprar: /comprarempresa",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
            Update3DTextLabelText(SBizzInfo[h][sbizzLabel],COLOR_COCONUT, label);
        }
        if(SBizzInfo[h][sbOwned] == 1)
        {
            format(label, sizeof(label), "%s\nDono : %s\nExtorsгo : %s\nTaxa: R$ %d - Level: %d \nEntrada /entrar",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]);
            Update3DTextLabelText(SBizzInfo[h][sbizzLabel],COLOR_COCONUT, label);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;
}
Reply


Messages In This Thread
[Ajuda] ADM Vender casa - by Felipe_Freeze - 26.03.2012, 19:40
Re: [Ajuda] ADM Vender casa - by Hiuship - 26.03.2012, 19:41
Re: [Ajuda] ADM Vender casa - by ViniBorn - 26.03.2012, 19:42
Re: [Ajuda] ADM Vender casa - by Felipe_Freeze - 26.03.2012, 19:47
Re: [Ajuda] ADM Vender casa - by ViniBorn - 26.03.2012, 19:47
Re: [Ajuda] ADM Vender casa - by Hiuship - 26.03.2012, 19:49
Re: [Ajuda] ADM Vender casa - by Felipe_Freeze - 26.03.2012, 19:54
Re: [Ajuda] ADM Vender casa - by Felipe_Wesker - 26.03.2012, 20:55
Re: [Ajuda] ADM Vender casa - by ViniBorn - 26.03.2012, 21:11

Forum Jump:


Users browsing this thread: 1 Guest(s)