01.02.2014, 23:00
Код HTML:
stock SaveDHs(houseid) { new query[6000], query2[1000]; mysql_pquery(MySQLConnection, "START TRANSACTION", "", "", ""); format(query, sizeof(query), "UPDATE houses SET Owner = %s, OutisdeX = %0.2f, OutisdeY = %0.2f, OutisdeZ = %0.2f, OutisdeA = %0.2f, InsideX = %0.2f, InsideY = %0.2f, InsideZ = %0.2f, InsideA = %0.2f, OutsideInterior = %d, OutisdeVirtualWorld = %d, Price = %d, Locked = %d WHERE ID = '%d'", HouseInfo[houseid][hOwner], HouseInfo[houseid][hOutsideX], HouseInfo[houseid][hOutsideY], HouseInfo[houseid][hOutsideZ], HouseInfo[houseid][hOutsideA], HouseInfo[houseid][hInsideX], HouseInfo[houseid][hInsideY], HouseInfo[houseid][hInsideZ], HouseInfo[houseid][hInsideA], HouseInfo[houseid][hOutsideInterior], HouseInfo[houseid][hOutsideVirtualWorld], HouseInfo[houseid][hPrice], HouseInfo[houseid][hOwned], HouseInfo[houseid][hLocked], houseid); mysql_pquery(MySQLConnection, query, "noresult", "", ""); format(query2, sizeof(query2), "UPDATE houses SET Weapon1 = %d, Weapon1Ammo = %d, Weapon2 = %d, Weapon2Ammo = %d,, Weapon3 = %d, Weapon3Ammo = %d, Weapon4 = %d, Weapon4Ammo = %d, Money = %d, RentUser = %s, RentPrice = %d, Rented = %d, RentDisabled = %d, Alarm = %d, Level = %d, InsideInterior = %d, InsideVirtualWorld = %d, Created = %d WHERE ID = '%d'", HouseInfo[houseid][hWeapon][0], HouseInfo[houseid][hWeaponAmmo][0], HouseInfo[houseid][hWeapon][1], HouseInfo[houseid][hWeaponAmmo][1], HouseInfo[houseid][hWeapon][2], HouseInfo[houseid][hWeaponAmmo][2], HouseInfo[houseid][hWeapon][3], HouseInfo[houseid][hWeaponAmmo][3], HouseInfo[houseid][hMoney], HouseInfo[houseid][hRentUser], HouseInfo[houseid][hRentPrice], HouseInfo[houseid][hRented], HouseInfo[houseid][hRentDisabled], HouseInfo[houseid][hAlarm], HouseInfo[houseid][hLevel], HouseInfo[houseid][hInsideInterior], HouseInfo[houseid][hInsideVirtualWorld], HouseInfo[houseid][hCreated], houseid); mysql_pquery(MySQLConnection, query2, "noresult", "", ""); return 1; }