19.10.2013, 16:49
I'm trying to update an old script that was scripted with an older version of MySql. How should I replace this?
I just need an explanation, I'm not looking for someone to do it for me.
pawn Код:
mysql_get_field("ID", result);
PlayerInfo[playerid][pID] = strval(result);
mysql_get_field("Cash", result);
PlayerInfo[playerid][pCash] = strval(result);
mysql_get_field("Account", result);
PlayerInfo[playerid][pAccount] = strval(result);
mysql_get_field("AdminLevel", result);
PlayerInfo[playerid][pAdmin] = strval(result);
mysql_get_field("Level", result);
PlayerInfo[playerid][pLevel] = strval(result);
mysql_get_field("Respect", result);
PlayerInfo[playerid][pExp] = strval(result);
mysql_get_field("UpgradePoints", result);
PlayerInfo[playerid][gPupgrade] = strval(result);
mysql_get_field("Kills", result);
PlayerInfo[playerid][pKills] = strval(result);
mysql_get_field("Gun1", result);
PlayerInfo[playerid][pGun1] = strval(result);
mysql_get_field("Gun2", result);
PlayerInfo[playerid][pGun2] = strval(result);
mysql_get_field("Gun3", result);
PlayerInfo[playerid][pGun3] = strval(result);
mysql_get_field("Gun4", result);
PlayerInfo[playerid][pGun4] = strval(result);
mysql_get_field("Gun5", result);
PlayerInfo[playerid][pGun5] = strval(result);
mysql_get_field("Gun6", result);
PlayerInfo[playerid][pGun6] = strval(result);
mysql_get_field("Ammo1", result);
PlayerInfo[playerid][pAmmo1] = strval(result);
mysql_get_field("Ammo2", result);
PlayerInfo[playerid][pAmmo2] = strval(result);
mysql_get_field("Ammo3", result);
PlayerInfo[playerid][pAmmo3] = strval(result);
mysql_get_field("Ammo4", result);
PlayerInfo[playerid][pAmmo4] = strval(result);
mysql_get_field("Ammo5", result);
PlayerInfo[playerid][pAmmo5] = strval(result);
mysql_get_field("Ammo6", result);
PlayerInfo[playerid][pAmmo6] = strval(result);
mysql_get_field("pSHealth", result);
PlayerInfo[playerid][pSHealth] = floatstr(result);
mysql_get_field("Health", result);
PlayerInfo[playerid][pHealth] = floatstr(result);
mysql_get_field("Pos_x", result);
PlayerInfo[playerid][pPos_x] = floatstr(result);
mysql_get_field("Pos_y", result);
PlayerInfo[playerid][pPos_y] = floatstr(result);
mysql_get_field("Pos_z", result);
PlayerInfo[playerid][pPos_z] = floatstr(result);
mysql_get_field("Int", result);
PlayerInfo[playerid][pInt] = strval(result);
mysql_get_field("Local", result);
PlayerInfo[playerid][pLocal] = strval(result);
mysql_get_field("Team", result);
PlayerInfo[playerid][pTeam] = strval(result);
mysql_get_field("Char", result);
PlayerInfo[playerid][pModel] = strval(result);
mysql_get_field("PhoneNr", result);
PlayerInfo[playerid][pPnumber] = strval(result);
mysql_get_field("pHouseKey", result);
PlayerInfo[playerid][pHousekey] = strval(result);
mysql_get_field("Bizz", result);
PlayerInfo[playerid][pPbiskey] = strval(result);
mysql_get_field("Banned", result);
PlayerInfo[playerid][pBanned] = strval(result);
mysql_get_field("FightSkill", result);
PlayerInfo[playerid][pFightSkill] = strval(result);
mysql_get_field("HotwireSkill", result);
PlayerInfo[playerid][pHotwireSkill] = strval(result);
mysql_get_field("ConnectTime", result);
PlayerInfo[playerid][pConnectTime] = strval(result);
mysql_get_field("Sex", result);
PlayerInfo[playerid][pSex] = strval(result);
mysql_get_field("Age", result);
PlayerInfo[playerid][pAge] = strval(result);
mysql_get_field("Tutorial", result);
PlayerInfo[playerid][pTut] = strval(result);
mysql_get_field("Member", result);
PlayerInfo[playerid][pMember] = strval(result);
mysql_get_field("Rank", result);
PlayerInfo[playerid][pRank] = strval(result);
mysql_get_field("Crashed", result);
PlayerInfo[playerid][pCrashed] = strval(result);
mysql_get_field("Job", result);
PlayerInfo[playerid][pJob] = strval(result);
mysql_get_field("HouseEntered", result);
HouseEntered[playerid] = strval(result);
mysql_get_field("IntEntered", result);
IntEntered[playerid] = strval(result);
mysql_get_field("CrashHealth", result);
PlayerInfo[playerid][pCrashHealth] = floatstr(result);
mysql_get_field("CrashArmour", result);
PlayerInfo[playerid][pCrashArmour] = floatstr(result);
mysql_get_field("World", result);
PlayerInfo[playerid][pWorld] = strval(result);
mysql_get_field("PayCheck", result);
PlayerInfo[playerid][pPayCheck] = strval(result);
mysql_get_field("PayDay", result);
PlayerInfo[playerid][pPayDay] = strval(result);
mysql_get_field("DonateRank", result);
PlayerInfo[playerid][pDonateRank] = strval(result);
mysql_get_field("ConnectTime", result);
PlayerInfo[playerid][pConnectTime] = strval(result);
mysql_get_field("DonateTime", result);
PlayerInfo[playerid][pDonateTime] = strval(result);
mysql_get_field("Jailed", result);
PlayerInfo[playerid][pJailed] = strval(result);
mysql_get_field("JailTime", result);
PlayerInfo[playerid][pJailTime] = strval(result);
mysql_get_field("Drugs", result);
PlayerInfo[playerid][pDrugs] = strval(result);
mysql_get_field("Materials", result);
PlayerInfo[playerid][pMats] = strval(result);
mysql_get_field("VaultOwned", result);
PlayerInfo[playerid][pVaultOwned] = strval(result);
mysql_get_field("VaultDrugs", result);
PlayerInfo[playerid][pVaultDrugs] = strval(result);
mysql_get_field("VaultMats", result);
PlayerInfo[playerid][pVaultMats] = strval(result);
mysql_get_field("Watch", result);
PlayerInfo[playerid][pWatch] = strval(result);
mysql_get_field("PhoneBook", result);
PlayerInfo[playerid][pPhoneBook] = strval(result);
mysql_get_field("Mask", result);
PlayerInfo[playerid][pMask] = strval(result);
mysql_get_field("CarLic", result);
PlayerInfo[playerid][pDrivLic] = strval(result);
mysql_get_field("Car", result);
PlayerInfo[playerid][pCarkey] = strval(result);
mysql_get_field("Car2", result);
PlayerInfo[playerid][pCarkey2] = strval(result);
mysql_get_field("Car3", result);
PlayerInfo[playerid][pCarkey3] = strval(result);
mysql_get_field("Married", result);
PlayerInfo[playerid][pMarried] = strval(result);
mysql_get_field("Helper", result);
PlayerInfo[playerid][pHelper] = strval(result);
mysql_get_field("WantedLevel", result);
WantedLevel[playerid] = strval(result);
mysql_get_field("GunLic", result);
PlayerInfo[playerid][pGunLic] = strval(result);
mysql_get_field("Crimes", result);
PlayerInfo[playerid][pCrimes] = strval(result);
mysql_get_field("Arrested", result);
PlayerInfo[playerid][pArrested] = strval(result);
mysql_get_field("MarriedTo", PlayerInfo[playerid][pMarriedTo]);
mysql_get_field("Taunt", result);
PlayerInfo[playerid][pTaunt] = strval(result);
mysql_get_field("InvWeapon", result);
PlayerInfo[playerid][pInvWeapon] = strval(result);
mysql_get_field("InvAmmo", result);
PlayerInfo[playerid][pInvAmmo] = strval(result);
mysql_get_field("InvBeer", result);
PlayerInfo[playerid][pInvBeer] = strval(result);
mysql_get_field("InvWine", result);
PlayerInfo[playerid][pInvWine] = strval(result);
mysql_get_field("InvCiggy", result);
PlayerInfo[playerid][pInvCiggy] = strval(result);
mysql_get_field("Hidden", result);
PlayerInfo[playerid][pHidden] = strval(result);
mysql_get_field("Walkie", result);
PlayerInfo[playerid][pWalkie] = strval(result);
mysql_get_field("WalkieFreq", result);
PlayerInfo[playerid][pWalkieFreq] = strval(result);
mysql_get_field("Lighter", result);
PlayerInfo[playerid][pLighter] = strval(result);
mysql_get_field("Cigs", result);
PlayerInfo[playerid][pCigs] = strval(result);
mysql_get_field("BanReason", PlayerInfo[playerid][pBanReason]);
mysql_get_field("Fishes1", PlayerInfo[playerid][pFishes1]);
mysql_get_field("Fishes2", PlayerInfo[playerid][pFishes2]);
mysql_get_field("Fishes3", PlayerInfo[playerid][pFishes3]);
mysql_get_field("Fishes4", PlayerInfo[playerid][pFishes4]);
mysql_get_field("Fishes5", PlayerInfo[playerid][pFishes5]);
mysql_get_field("Fish1", result);
PlayerInfo[playerid][pFish][0] = strval(result);
mysql_get_field("Fish2", result);
PlayerInfo[playerid][pFish][1] = strval(result);
mysql_get_field("Fish3", result);
PlayerInfo[playerid][pFish][2] = strval(result);
mysql_get_field("Fish4", result);
PlayerInfo[playerid][pFish][3] = strval(result);
mysql_get_field("Fish5", result);
PlayerInfo[playerid][pFish][4] = strval(result);
mysql_get_field("Note1s", result);
PlayerInfo[playerid][pNote1s] = strval(result);
mysql_get_field("Note2s", result);
PlayerInfo[playerid][pNote2s] = strval(result);
mysql_get_field("Note3s", result);
PlayerInfo[playerid][pNote3s] = strval(result);
mysql_get_field("Note4s", result);
PlayerInfo[playerid][pNote4s] = strval(result);
mysql_get_field("Note5s", result);
PlayerInfo[playerid][pNote5s] = strval(result);
mysql_get_field("Note1", PlayerInfo[playerid][pNote1]);
mysql_get_field("Note2", PlayerInfo[playerid][pNote2]);
mysql_get_field("Note3", PlayerInfo[playerid][pNote3]);
mysql_get_field("Note4", PlayerInfo[playerid][pNote4]);
mysql_get_field("Note5", PlayerInfo[playerid][pNote5]);
mysql_get_field("JobDelay", result);
JobDelay[playerid] = strval(result);
mysql_get_field("MaskUse", result);
PlayerInfo[playerid][pMaskUse] = strval(result);
mysql_get_field("Accent", PlayerInfo[playerid][pAccent]);
mysql_get_field("Voted2", result);
PlayerInfo[playerid][pVoted] = strval(result);
mysql_get_field("AdmName", PlayerInfo[playerid][pAdmName]);
mysql_get_field("HeadValue", result);
PlayerInfo[playerid][pHeadValue] = strval(result);
mysql_get_field("HiddenNum", result);
PlayerInfo[playerid][pHiddenNum] = strval(result);
mysql_get_field("Skate", result);
PlayerInfo[playerid][pSkate] = strval(result);
mysql_get_field("Radio", result);
PlayerInfo[playerid][pRadio] = strval(result);
mysql_get_field("Ticket0", result);
PlayerInfo[playerid][pTicket][0] = strval(result);
mysql_get_field("Ticket1", result);
PlayerInfo[playerid][pTicket][1] = strval(result);
mysql_get_field("Ticket2", result);
PlayerInfo[playerid][pTicket][2] = strval(result);
mysql_get_field("Ticket3", result);
PlayerInfo[playerid][pTicket][3] = strval(result);
mysql_get_field("Ticket4", result);
PlayerInfo[playerid][pTicket][4] = strval(result);
mysql_get_field("TicketReason0", PlayerInfo[playerid][pTicketReason0]);
mysql_get_field("TicketReason1", PlayerInfo[playerid][pTicketReason1]);
mysql_get_field("TicketReason2", PlayerInfo[playerid][pTicketReason2]);
mysql_get_field("TicketReason3", PlayerInfo[playerid][pTicketReason3]);
mysql_get_field("TicketReason4", PlayerInfo[playerid][pTicketReason4]);
mysql_get_field("App", PlayerInfo[playerid][pApp]);
mysql_get_field("Changes", result);
PlayerInfo[playerid][pChanges] = strval(result);
mysql_get_field("FamNum", result);
PlayerInfo[playerid][pFamNum] = strval(result);
mysql_get_field("Tatto", PlayerInfo[playerid][pTattoo]);
mysql_get_field("Cellphone", result);
PlayerInfo[playerid][pCellphone] = strval(result);
mysql_get_field("Celltime", result);
PlayerInfo[playerid][pCelltime] = strval(result);
mysql_get_field("Cellplan", result);
PlayerInfo[playerid][pCellplan] = strval(result);
mysql_get_field("DonerGate1", result);
PlayerInfo[playerid][pDonerGate1] = strval(result);
mysql_get_field("BreakAllow", result);
BreakAllow[playerid] = strval(result);
mysql_get_field("FurnLocked", result);
PlayerInfo[playerid][pFurnLocked] = strval(result);
mysql_get_field("DonateCarDate", result);
PlayerInfo[playerid][pDonatorCarDate] = strval(result);
mysql_get_field("Warrant", result);
PlayerInfo[playerid][pWarrant] = strval(result);
mysql_get_field("WarrantReason", PlayerInfo[playerid][pWarrantReason]);
mysql_get_field("FactionIdent", result);
PlayerInfo[playerid][pFactionIden] = strval(result);
mysql_get_field("LockTime", result);
PlayerInfo[playerid][pLockTime] = strval(result);
mysql_get_field("FH", result);
PlayerInfo[playerid][pFH] = strval(result);
mysql_get_field("FB", result);
PlayerInfo[playerid][pFB] = strval(result);
mysql_get_field("Approved", result);
PlayerInfo[playerid][pApproved] = strval(result);
mysql_get_field("Hunger", result);
PlayerInfo[playerid][pHunger] = strval(result);
for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
{
mysql_get_field("pvModelId", result);
PlayerVehicleInfo[playerid][v][pvModelId] = strval(result);
mysql_get_field("pvPosX", result);
PlayerVehicleInfo[playerid][v][pvPosX] = strval(result);
mysql_get_field("pvPosY", result);
PlayerVehicleInfo[playerid][v][pvPosY] = strval(result);
mysql_get_field("pvPosZ", result);
PlayerVehicleInfo[playerid][v][pvPosZ] = strval(result);
mysql_get_field("pvPosAngle", result);
PlayerVehicleInfo[playerid][v][pvPosAngle] = strval(result);
mysql_get_field("pvPaintJob", result);
PlayerVehicleInfo[playerid][v][pvPaintJob] = strval(result);
mysql_get_field("pvColor1", result);
PlayerVehicleInfo[playerid][v][pvColor1] = strval(result);
mysql_get_field("pvColor2", result);
PlayerVehicleInfo[playerid][v][pvColor2] = strval(result);
mysql_get_field("pvPrice", result);
PlayerVehicleInfo[playerid][v][pvPrice] = strval(result);
mysql_get_field("pvTicket", result);
PlayerVehicleInfo[playerid][v][pvTicket] = strval(result);
mysql_get_field("pvWeapons0", result);
PlayerVehicleInfo[playerid][v][pvWeapons][0] = strval(result);
mysql_get_field("pvWeapons1", result);
PlayerVehicleInfo[playerid][v][pvWeapons][1] = strval(result);
mysql_get_field("pvWeapons2", result);
PlayerVehicleInfo[playerid][v][pvWeapons][2] = strval(result);
mysql_get_field("pvWepUpgrade", result);
PlayerVehicleInfo[playerid][v][pvWepUpgrade] = strval(result);
mysql_get_field("pvFuel", result);
PlayerVehicleInfo[playerid][v][pvFuel] = strval(result);
mysql_get_field("pvImpounded", result);
PlayerVehicleInfo[playerid][v][pvImpounded] = strval(result);
mysql_get_field("pvLock", result);
PlayerVehicleInfo[playerid][v][pvLock] = strval(result);
mysql_get_field("pvLocked", result);
PlayerVehicleInfo[playerid][v][pvLocked] = strval(result);
mysql_get_field("pvNumberPlate", PlayerVehicleInfo[playerid][v][pvNumberPlate]);
for(new m = 0; m < MAX_MODS; m++)
{
mysql_get_field("pvMods", result);
PlayerVehicleInfo[playerid][v][pvMods][m] = strval(result);
}
}