format(saveQuery, sizeof(saveQuery), "%s, playerPhoneBook = '%d', playerGroup = '%d', playerGroupRank = '%d', playerIP = '%s', playerDropCarTimeout = '%d', playerHotwireTime = '%d', playerRope = '%d', playerVehicleParts = '%d', playerScrewDriver = '%d', playerGasCan = '%d', playerIdentification = '%d',playerAdminDuty = '%d', playerCrimes = '%d', playerArrests = '%d', playerWarrants = '%d', playerAge = '%d', playerCarMod7 = '%d', playerCarMod8 = '%d', playerCarMod9 = '%d', playerCarMod10 = '%d', playerCarMod11 = '%d', playerCarMod12 = '%d'",
saveQuery, playerVariables[playerid][pPhoneBook], playerVariables[playerid][pGroup], playerVariables[playerid][pGroupRank], playerVariables[playerid][pConnectionIP], playerVariables[playerid][pDropCarTimeout], playerVariables[playerid][pHotwireTime], playerVariables[playerid][pRope], playerVariables[playerid][pVehicleParts], playerVariables[playerid][pScrewDriver], playerVariables[playerid][pGasCan], playerVariables[playerid][pIdentification], playerVariables[playerid][pAdminDuty], playerVariables[playerid][pCrimes],
playerVariables[playerid][pArrests], playerVariables[playerid][pWarrants], playerVariables[playerid][pAge], playerVariables[playerid][pCarMods][7], playerVariables[playerid][pCarMods][8], playerVariables[playerid][pCarMods][9], playerVariables[playerid][pCarMods][10], playerVariables[playerid][pCarMods][11], playerVariables[playerid][pCarMods][12]);
new saveQuery2[200];
format(saveQuery, sizeof(saveQuery), "%s, playerPhoneBook = '%d', playerGroup = '%d', playerGroupRank = '%d', playerIP = '%s', playerDropCarTimeout = '%d', playerHotwireTime = '%d', playerRope = '%d', playerVehicleParts = '%d', playerScrewDriver = '%d', playerGasCan = '%d', playerIdentification = '%d',playerAdminDuty = '%d', playerCrimes = '%d', playerArrests = '%d', playerWarrants = '%d', playerAge = '%d'"
, saveQuery, playerVariables[playerid][pPhoneBook], playerVariables[playerid][pGroup]
, playerVariables[playerid][pGroupRank], playerVariables[playerid][pConnectionIP]
, playerVariables[playerid][pDropCarTimeout], playerVariables[playerid][pHotwireTime]
, playerVariables[playerid][pRope], playerVariables[playerid][pVehicleParts]
, playerVariables[playerid][pScrewDriver], playerVariables[playerid][pGasCan]
, playerVariables[playerid][pIdentification], playerVariables[playerid][pAdminDuty]
, playerVariables[playerid][pCrimes],playerVariables[playerid][pArrests], playerVariables[playerid][pWarrants]
, playerVariables[playerid][pAge]);
format(saveQuery2,sizeof(saveQuery2),", playerCarMod7 = '%d', playerCarMod8 = '%d', playerCarMod9 = '%d', playerCarMod10 = '%d', playerCarMod11 = '%d', playerCarMod12 = '%d'"
, playerVariables[playerid][pCarMods][7], playerVariables[playerid][pCarMods][8]
, playerVariables[playerid][pCarMods][9], playerVariables[playerid][pCarMods][10]
, playerVariables[playerid][pCarMods][11], playerVariables[playerid][pCarMods][12]);
strcat(saveQuery,saveQuery2);
// --
format(saveQuery, sizeof(saveQuery), "%s, playerPhoneBook = '%d', playerGroup = '%d', playerGroupRank = '%d', playerIP = '%s', playerDropCarTimeout = '%d', playerHotwireTime = '%d', playerRope = '%d', playerVehicleParts = '%d', playerScrewDriver = '%d', playerGasCan = '%d', playerIdentification = '%d',playerAdminDuty = '%d', \
playerCrimes = '%d', playerArrests = '%d', playerWarrants = '%d', playerAge = '%d', playerCarMod7 = '%d', playerCarMod8 = '%d', playerCarMod9 = '%d', playerCarMod10 = '%d', playerCarMod11 = '%d', playerCarMod12 = '%d'", playerVariables[playerid][pPhoneBook], playerVariables[playerid][pGroup], playerVariables[playerid][pGroupRank],
playerVariables[playerid][pConnectionIP], playerVariables[playerid][pDropCarTimeout], playerVariables[playerid][pHotwireTime], playerVariables[playerid][pRope], playerVariables[playerid][pVehicleParts], playerVariables[playerid][pScrewDriver], playerVariables[playerid][pGasCan], playerVariables[playerid][pIdentification],
playerVariables[playerid][pAdminDuty], playerVariables[playerid][pCrimes], playerVariables[playerid][pArrests], playerVariables[playerid][pWarrants], playerVariables[playerid][pAge], playerVariables[playerid][pCarMods][7], playerVariables[playerid][pCarMods][8], playerVariables[playerid][pCarMods][9], playerVariables[playerid][pCarMods][10],
playerVariables[playerid][pCarMods][11], playerVariables[playerid][pCarMods][12]);
You were required to make another string and format half variables in it and you were required to attach those two strings using strcat function function which is also known as String concatenation. Here's the code. Have fun scripting.
pawn Код:
|