20.03.2017, 21:16
Hey guys, i have a problem with BlueG (R40) native "mysql_tquery".This function doesn't insert into the database.
Код:
stock OnPlayerBuyFurniture(houseid, interior, world, furnitureslot, model, price, name[], Float:x, Float:y, Float:z) { mysql_format(dbHandle, query, sizeof(query), "INSERT INTO `furnitures` (model, name, houseid, interior, virworld, marketprice, posx, posy, posz) VALUES (%d, '%s', %d, %d, %d, %d, %f, %f, %f)", model, name, HouseInfo[houseid][hID], interior, world, price, x, y ,z); mysql_tquery(dbHandle, query,"OnFurnitureInsert", "iiiiiis[128]fff", houseid, interior, world, furnitureslot, model, price, name, x, y, z); return 1; } public OnFurnitureInsert(houseid, interior, world, furnitureslot, model, price, name[], Float:x, Float:y, Float:z) { FurnitureInfo[houseid][furnitureslot][fID] = cache_insert_id(); FurnitureInfo[houseid][furnitureslot][fHouseID] = houseid; FurnitureInfo[houseid][furnitureslot][fInterior] = interior; FurnitureInfo[houseid][furnitureslot][fVirtualWorld] = world; FurnitureInfo[houseid][furnitureslot][fMarketPrice] = price; FurnitureInfo[houseid][furnitureslot][fModel] = model; FurnitureInfo[houseid][furnitureslot][fPosX] = x; FurnitureInfo[houseid][furnitureslot][fPosY] = y; FurnitureInfo[houseid][furnitureslot][fPosZ] = z; FurnitureInfo[houseid][furnitureslot][fPosRX] = 0.0; FurnitureInfo[houseid][furnitureslot][fPosRY] = 0.0; FurnitureInfo[houseid][furnitureslot][fPosRZ] = 0.0; format(FurnitureInfo[houseid][furnitureslot][fName], 128, "%s", name); FurnitureInfo[houseid][furnitureslot][fOn] = 1; return 1; }