[HELP] MySQL saving house
#10

pawn Код:
stock CreateDynamicHouse(Float: EnterX, Float: EnterY, Float: EnterZ, Interior, Float: InteriorX, Float: InteriorY, Float: InteriorZ, Price, VirtualWorld, HouseID)
{
    if(HouseID < 0 || HouseID >= sizeof(HouseInfo)) return 0;
   
    HouseInfo[HouseID][hEnterX] = EnterX;
    HouseInfo[HouseID][hEnterY] = EnterY;
    HouseInfo[HouseID][hEnterZ] = EnterZ;
    HouseInfo[HouseID][hInteriorX] = InteriorX;
    HouseInfo[HouseID][hInteriorY] = InteriorY;
    HouseInfo[HouseID][hInteriorZ] = InteriorZ;
    HouseInfo[HouseID][hInterior] = Interior;
    HouseInfo[HouseID][hVirtualWorld] = VirtualWorld;
    HouseInfo[HouseID][hPrice] = Price;

    House += 1;
    House_Price[House] = Price;
    Buy_House[House] = CreatePickup(1239, 2, EnterX, EnterY, EnterZ, -1);
    format(hstring, sizeof(hstring), "For sale!\nPrice: %d\nType /buyhouse to buy house!", Price);
    Label += 1;
    LabelMake[Label] = Create3DTextLabel(hstring, 0x21DD00FF, EnterX, EnterY, EnterZ, 40.0, 0);
   
    mysql_real_escape_string("None", hescpname);
    format(HQuery, sizeof(HQuery), "INSERT INTO `house` (`User`, `EnterX`, `EnterY`, `EnterZ`, `Interior`, `InteriorX`, `InteriorY`, `InteriorZ`, `Price`, `VirtualWorld`, `HouseID`) VALUES ('%s', '%f', '%f', '%f', '%d', '%f', '%f', '%f', '%d', '%d', '%d')",
        hescpname, EnterX, EnterY, EnterZ, Interior, InteriorX, InteriorY, InteriorZ, Price, VirtualWorld, HouseID);
    mysql_query(HQuery);
    return 1;
}
Reply


Messages In This Thread
[HELP] MySQL saving house - by System64 - 08.09.2011, 12:27
Re: [HELP] MySQL saving house - by THE_KNOWN - 08.09.2011, 13:30
Re: [HELP] MySQL saving house - by System64 - 08.09.2011, 13:33
Re: [HELP] MySQL saving house - by Vince - 08.09.2011, 13:35
Re: [HELP] MySQL saving house - by Farsek - 08.09.2011, 13:36
Re: [HELP] MySQL saving house - by System64 - 08.09.2011, 13:53
Re: [HELP] MySQL saving house - by System64 - 08.09.2011, 15:51
Re: [HELP] MySQL saving house - by System64 - 08.09.2011, 18:20
Re: [HELP] MySQL saving house - by System64 - 09.09.2011, 09:33
Re: [HELP] MySQL saving house - by MadeMan - 09.09.2011, 09:46

Forum Jump:


Users browsing this thread: 3 Guest(s)