15.12.2014, 08:57
pawn Код:
stock saveBusiness(const id) {
if(strlen(businessVariables[id][bOwner]) >= 1) {
new
queryString[1424];
mysql_format(handle, queryString, sizeof(queryString), "UPDATE businesses SET \
businessExteriorX = '%f', \
businessExteriorY = '%f', \
businessExteriorZ = '%f', \
businessInteriorX = '%f', \
businessInteriorY = '%f', \
businessInteriorZ = '%f', \
businessInterior = '%d', \
businessType = '%d', \
businessName = '%e', \
businessOwner = '%e', \
businessPrice = '%d', \
businessVault = '%d', \
businessLock = '%d', \
businessMiscX = '%f', \
businessMiscY = '%f', \
businessMiscZ = '%f', \
businessEnterPrice = '%d', \
businessLevel = '%d' \
WHERE businessID = '%d'",
businessVariables[id][bExteriorPos][0],
businessVariables[id][bExteriorPos][1],
businessVariables[id][bExteriorPos][2],
businessVariables[id][bInteriorPos][0],
businessVariables[id][bInteriorPos][1],
businessVariables[id][bInteriorPos][2],
businessVariables[id][bInterior],
businessVariables[id][bType],
businessVariables[id][bName],
businessVariables[id][bOwner],
businessVariables[id][bPrice],
businessVariables[id][bVault],
businessVariables[id][bLocked],
businessVariables[id][bMiscPos][0],
businessVariables[id][bMiscPos][1],
businessVariables[id][bMiscPos][2],
businessVariables[id][bEnterPrice],
businessVariables[id][bLevel],
id
);
mysql_tquery(handle, queryString);
}
else {
return false;
}
return 1;
}