08.08.2015, 16:06
yo
well, I got registration and login using this file system, but there is an issue with saving player's ini. i played with few players that only one file finally is updated. I really got no idea why, here u got all my savin.
also, PlayerInfo works fine cuz i just printed it, print in bottom this all settin is showin up too.
well, I got registration and login using this file system, but there is an issue with saving player's ini. i played with few players that only one file finally is updated. I really got no idea why, here u got all my savin.
also, PlayerInfo works fine cuz i just printed it, print in bottom this all settin is showin up too.
Код:
public OnPlayerDisconnect(playerid, reason) { new file[64]; GetPlayerName(playerid,file,sizeof(file)); format(file,sizeof(file),DOF2_File(file)); DOF2_SetInt(file, "Kills",PlayerInfo[playerid][pKills]); DOF2_SetInt(file, "Deaths",PlayerInfo[playerid][pDeaths]); DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]); DOF2_SetInt(file, "Bank",PlayerInfo[playerid][pBank]); DOF2_SetInt(file, "AdminLevel",PlayerInfo[playerid][pAdmin]); DOF2_SetInt(file, "VIP",PlayerInfo[playerid][pVIP]); DOF2_SetInt(file, "Job",PlayerInfo[playerid][pJob]); DOF2_SetInt(file, "Skin",PlayerInfo[playerid][pSkin]); DOF2_SetInt(file, "Vehicle0", PlayerInfo[playerid][pVehicle][0]); DOF2_SetInt(file, "Veh0Color1", PlayerInfo[playerid][pVeh0Color][0]); DOF2_SetInt(file, "Veh0Color2", PlayerInfo[playerid][pVeh0Color][1]); DOF2_SetInt(file, "Veh0ComponentSlot0", PlayerInfo[playerid][pVeh0ComponentSlot][0]); DOF2_SetInt(file, "Veh0ComponentSlot1", PlayerInfo[playerid][pVeh0ComponentSlot][1]); DOF2_SetInt(file, "Veh0ComponentSlot2", PlayerInfo[playerid][pVeh0ComponentSlot][2]); DOF2_SetInt(file, "Veh0ComponentSlot3", PlayerInfo[playerid][pVeh0ComponentSlot][3]); DOF2_SetInt(file, "Veh0ComponentSlot4", PlayerInfo[playerid][pVeh0ComponentSlot][4]); DOF2_SetInt(file, "Veh0ComponentSlot5", PlayerInfo[playerid][pVeh0ComponentSlot][5]); DOF2_SetInt(file, "Veh0ComponentSlot6", PlayerInfo[playerid][pVeh0ComponentSlot][6]); DOF2_SetInt(file, "Veh0ComponentSlot7", PlayerInfo[playerid][pVeh0ComponentSlot][7]); DOF2_SetInt(file, "Veh0ComponentSlot8", PlayerInfo[playerid][pVeh0ComponentSlot][8]); DOF2_SetInt(file, "Veh0ComponentSlot9", PlayerInfo[playerid][pVeh0ComponentSlot][9]); DOF2_SetInt(file, "Veh0ComponentSlot10", PlayerInfo[playerid][pVeh0ComponentSlot][10]); DOF2_SetInt(file, "Veh0ComponentSlot11", PlayerInfo[playerid][pVeh0ComponentSlot][11]); DOF2_SetInt(file, "Veh0ComponentSlot12", PlayerInfo[playerid][pVeh0ComponentSlot][12]); DOF2_SetInt(file, "Veh0ComponentSlot13", PlayerInfo[playerid][pVeh0ComponentSlot][13]); DOF2_SetInt(file, "Vehicle1", PlayerInfo[playerid][pVehicle][1]); DOF2_SetInt(file, "Veh1Color1", PlayerInfo[playerid][pVeh1Color][0]); DOF2_SetInt(file, "Veh1Color2", PlayerInfo[playerid][pVeh1Color][1]); DOF2_SetInt(file, "Veh0ComponentSlot0", PlayerInfo[playerid][pVeh1ComponentSlot][0]); DOF2_SetInt(file, "Veh1ComponentSlot1", PlayerInfo[playerid][pVeh1ComponentSlot][1]); DOF2_SetInt(file, "Veh2ComponentSlot2", PlayerInfo[playerid][pVeh1ComponentSlot][2]); DOF2_SetInt(file, "Veh3ComponentSlot3", PlayerInfo[playerid][pVeh1ComponentSlot][3]); DOF2_SetInt(file, "Veh4ComponentSlot4", PlayerInfo[playerid][pVeh1ComponentSlot][4]); DOF2_SetInt(file, "Veh5ComponentSlot5", PlayerInfo[playerid][pVeh1ComponentSlot][5]); DOF2_SetInt(file, "Veh6ComponentSlot6", PlayerInfo[playerid][pVeh1ComponentSlot][6]); DOF2_SetInt(file, "Veh7ComponentSlot7", PlayerInfo[playerid][pVeh1ComponentSlot][7]); DOF2_SetInt(file, "Veh8ComponentSlot8", PlayerInfo[playerid][pVeh1ComponentSlot][8]); DOF2_SetInt(file, "Veh9ComponentSlot9", PlayerInfo[playerid][pVeh1ComponentSlot][9]); DOF2_SetInt(file, "Veh10ComponentSlot10", PlayerInfo[playerid][pVeh1ComponentSlot][10]); DOF2_SetInt(file, "Veh11ComponentSlot11", PlayerInfo[playerid][pVeh1ComponentSlot][11]); DOF2_SetInt(file, "Veh12ComponentSlot12", PlayerInfo[playerid][pVeh1ComponentSlot][12]); DOF2_SetInt(file, "Veh13ComponentSlot13", PlayerInfo[playerid][pVeh1ComponentSlot][13]); DOF2_SetInt(file, "Vehicle2", PlayerInfo[playerid][pVehicle][2]); DOF2_SetInt(file, "Veh2Color1", PlayerInfo[playerid][pVeh2Color][0]); DOF2_SetInt(file, "Veh2Color2", PlayerInfo[playerid][pVeh2Color][1]); DOF2_SetInt(file, "Veh2ComponentSlot0", PlayerInfo[playerid][pVeh2ComponentSlot][0]); DOF2_SetInt(file, "Veh2ComponentSlot1", PlayerInfo[playerid][pVeh2ComponentSlot][1]); DOF2_SetInt(file, "Veh2ComponentSlot2", PlayerInfo[playerid][pVeh2ComponentSlot][2]); DOF2_SetInt(file, "Veh2ComponentSlot3", PlayerInfo[playerid][pVeh2ComponentSlot][3]); DOF2_SetInt(file, "Veh2ComponentSlot4", PlayerInfo[playerid][pVeh2ComponentSlot][4]); DOF2_SetInt(file, "Veh2ComponentSlot5", PlayerInfo[playerid][pVeh2ComponentSlot][5]); DOF2_SetInt(file, "Veh2ComponentSlot6", PlayerInfo[playerid][pVeh2ComponentSlot][6]); DOF2_SetInt(file, "Veh2ComponentSlot7", PlayerInfo[playerid][pVeh2ComponentSlot][7]); DOF2_SetInt(file, "Veh2ComponentSlot8", PlayerInfo[playerid][pVeh2ComponentSlot][8]); DOF2_SetInt(file, "Veh2ComponentSlot9", PlayerInfo[playerid][pVeh2ComponentSlot][9]); DOF2_SetInt(file, "Veh2ComponentSlot10", PlayerInfo[playerid][pVeh2ComponentSlot][10]); DOF2_SetInt(file, "Veh2ComponentSlot11", PlayerInfo[playerid][pVeh2ComponentSlot][11]); DOF2_SetInt(file, "Veh2ComponentSlot12", PlayerInfo[playerid][pVeh2ComponentSlot][12]); DOF2_SetInt(file, "Veh2ComponentSlot13", PlayerInfo[playerid][pVeh2ComponentSlot][13]); DOF2_SetInt(file, "Vehicle3", PlayerInfo[playerid][pVehicle][3]); DOF2_SetInt(file, "Veh3Color1", PlayerInfo[playerid][pVeh3Color][0]); DOF2_SetInt(file, "Veh3Color2", PlayerInfo[playerid][pVeh3Color][1]); DOF2_SetInt(file, "Veh3ComponentSlot0", PlayerInfo[playerid][pVeh3ComponentSlot][0]); DOF2_SetInt(file, "Veh3ComponentSlot1", PlayerInfo[playerid][pVeh3ComponentSlot][1]); DOF2_SetInt(file, "Veh3ComponentSlot2", PlayerInfo[playerid][pVeh3ComponentSlot][2]); DOF2_SetInt(file, "Veh3ComponentSlot3", PlayerInfo[playerid][pVeh3ComponentSlot][3]); DOF2_SetInt(file, "Veh3ComponentSlot4", PlayerInfo[playerid][pVeh3ComponentSlot][4]); DOF2_SetInt(file, "Veh3ComponentSlot5", PlayerInfo[playerid][pVeh3ComponentSlot][5]); DOF2_SetInt(file, "Veh3ComponentSlot6", PlayerInfo[playerid][pVeh3ComponentSlot][6]); DOF2_SetInt(file, "Veh3ComponentSlot7", PlayerInfo[playerid][pVeh3ComponentSlot][7]); DOF2_SetInt(file, "Veh3ComponentSlot8", PlayerInfo[playerid][pVeh3ComponentSlot][8]); DOF2_SetInt(file, "Veh3ComponentSlot9", PlayerInfo[playerid][pVeh3ComponentSlot][9]); DOF2_SetInt(file, "Veh3ComponentSlot10", PlayerInfo[playerid][pVeh3ComponentSlot][10]); DOF2_SetInt(file, "Veh3ComponentSlot11", PlayerInfo[playerid][pVeh3ComponentSlot][11]); DOF2_SetInt(file, "Veh3ComponentSlot12", PlayerInfo[playerid][pVeh3ComponentSlot][12]); DOF2_SetInt(file, "Veh3ComponentSlot13", PlayerInfo[playerid][pVeh3ComponentSlot][13]); DOF2_SetInt(file, "Vehicle4", PlayerInfo[playerid][pVehicle][4]); DOF2_SetInt(file, "Veh4Color1", PlayerInfo[playerid][pVeh4Color][0]); DOF2_SetInt(file, "Veh4Color2", PlayerInfo[playerid][pVeh4Color][1]); DOF2_SetInt(file, "Veh4ComponentSlot0", PlayerInfo[playerid][pVeh4ComponentSlot][0]); DOF2_SetInt(file, "Veh4ComponentSlot1", PlayerInfo[playerid][pVeh4ComponentSlot][1]); DOF2_SetInt(file, "Veh4ComponentSlot2", PlayerInfo[playerid][pVeh4ComponentSlot][2]); DOF2_SetInt(file, "Veh4ComponentSlot3", PlayerInfo[playerid][pVeh4ComponentSlot][3]); DOF2_SetInt(file, "Veh4ComponentSlot4", PlayerInfo[playerid][pVeh4ComponentSlot][4]); DOF2_SetInt(file, "Veh4ComponentSlot5", PlayerInfo[playerid][pVeh4ComponentSlot][5]); DOF2_SetInt(file, "Veh4ComponentSlot6", PlayerInfo[playerid][pVeh4ComponentSlot][6]); DOF2_SetInt(file, "Veh4ComponentSlot7", PlayerInfo[playerid][pVeh4ComponentSlot][7]); DOF2_SetInt(file, "Veh4ComponentSlot8", PlayerInfo[playerid][pVeh4ComponentSlot][8]); DOF2_SetInt(file, "Veh4ComponentSlot9", PlayerInfo[playerid][pVeh4ComponentSlot][9]); DOF2_SetInt(file, "Veh4ComponentSlot10", PlayerInfo[playerid][pVeh4ComponentSlot][10]); DOF2_SetInt(file, "Veh4ComponentSlot11", PlayerInfo[playerid][pVeh4ComponentSlot][11]); DOF2_SetInt(file, "Veh4ComponentSlot12", PlayerInfo[playerid][pVeh4ComponentSlot][12]); DOF2_SetInt(file, "Veh4ComponentSlot13", PlayerInfo[playerid][pVeh4ComponentSlot][13]); DOF2_SetInt(file, "Vehicle5", PlayerInfo[playerid][pVehicle][5]); DOF2_SetInt(file, "Veh5Color1", PlayerInfo[playerid][pVeh5Color][0]); DOF2_SetInt(file, "Veh5Color2", PlayerInfo[playerid][pVeh5Color][1]); DOF2_SetInt(file, "Veh5ComponentSlot0", PlayerInfo[playerid][pVeh5ComponentSlot][0]); DOF2_SetInt(file, "Veh5ComponentSlot1", PlayerInfo[playerid][pVeh5ComponentSlot][1]); DOF2_SetInt(file, "Veh5ComponentSlot2", PlayerInfo[playerid][pVeh5ComponentSlot][2]); DOF2_SetInt(file, "Veh5ComponentSlot3", PlayerInfo[playerid][pVeh5ComponentSlot][3]); DOF2_SetInt(file, "Veh5ComponentSlot4", PlayerInfo[playerid][pVeh5ComponentSlot][4]); DOF2_SetInt(file, "Veh5ComponentSlot5", PlayerInfo[playerid][pVeh5ComponentSlot][5]); DOF2_SetInt(file, "Veh5ComponentSlot6", PlayerInfo[playerid][pVeh5ComponentSlot][6]); DOF2_SetInt(file, "Veh5ComponentSlot7", PlayerInfo[playerid][pVeh5ComponentSlot][7]); DOF2_SetInt(file, "Veh5ComponentSlot8", PlayerInfo[playerid][pVeh5ComponentSlot][8]); DOF2_SetInt(file, "Veh5ComponentSlot9", PlayerInfo[playerid][pVeh5ComponentSlot][9]); DOF2_SetInt(file, "Veh5ComponentSlot10", PlayerInfo[playerid][pVeh5ComponentSlot][10]); DOF2_SetInt(file, "Veh5ComponentSlot11", PlayerInfo[playerid][pVeh5ComponentSlot][11]); DOF2_SetInt(file, "Veh5ComponentSlot12", PlayerInfo[playerid][pVeh5ComponentSlot][12]); DOF2_SetInt(file, "Veh5ComponentSlot13", PlayerInfo[playerid][pVeh5ComponentSlot][13]); DOF2_SetInt(file, "Vehicle6", PlayerInfo[playerid][pVehicle][6]); DOF2_SetInt(file, "Veh6Color1", PlayerInfo[playerid][pVeh6Color][0]); DOF2_SetInt(file, "Veh6Color2", PlayerInfo[playerid][pVeh6Color][1]); DOF2_SetInt(file, "Veh6ComponentSlot0", PlayerInfo[playerid][pVeh6ComponentSlot][0]); DOF2_SetInt(file, "Veh6ComponentSlot1", PlayerInfo[playerid][pVeh6ComponentSlot][1]); DOF2_SetInt(file, "Veh6ComponentSlot2", PlayerInfo[playerid][pVeh6ComponentSlot][2]); DOF2_SetInt(file, "Veh6ComponentSlot3", PlayerInfo[playerid][pVeh6ComponentSlot][3]); DOF2_SetInt(file, "Veh6ComponentSlot4", PlayerInfo[playerid][pVeh6ComponentSlot][4]); DOF2_SetInt(file, "Veh6ComponentSlot5", PlayerInfo[playerid][pVeh6ComponentSlot][5]); DOF2_SetInt(file, "Veh6ComponentSlot6", PlayerInfo[playerid][pVeh6ComponentSlot][6]); DOF2_SetInt(file, "Veh6ComponentSlot7", PlayerInfo[playerid][pVeh6ComponentSlot][7]); DOF2_SetInt(file, "Veh6ComponentSlot8", PlayerInfo[playerid][pVeh6ComponentSlot][8]); DOF2_SetInt(file, "Veh6ComponentSlot9", PlayerInfo[playerid][pVeh6ComponentSlot][9]); DOF2_SetInt(file, "Veh6ComponentSlot10", PlayerInfo[playerid][pVeh6ComponentSlot][10]); DOF2_SetInt(file, "Veh6ComponentSlot11", PlayerInfo[playerid][pVeh6ComponentSlot][11]); DOF2_SetInt(file, "Veh6ComponentSlot12", PlayerInfo[playerid][pVeh6ComponentSlot][12]); DOF2_SetInt(file, "Veh6ComponentSlot13", PlayerInfo[playerid][pVeh6ComponentSlot][13]); DOF2_SetInt(file, "Vehicle7", PlayerInfo[playerid][pVehicle][7]); DOF2_SetInt(file, "Veh7Color1", PlayerInfo[playerid][pVeh7Color][0]); DOF2_SetInt(file, "Veh7Color2", PlayerInfo[playerid][pVeh7Color][1]); DOF2_SetInt(file, "Veh7ComponentSlot0", PlayerInfo[playerid][pVeh7ComponentSlot][0]); DOF2_SetInt(file, "Veh7ComponentSlot1", PlayerInfo[playerid][pVeh7ComponentSlot][1]); DOF2_SetInt(file, "Veh7ComponentSlot2", PlayerInfo[playerid][pVeh7ComponentSlot][2]); DOF2_SetInt(file, "Veh7ComponentSlot3", PlayerInfo[playerid][pVeh7ComponentSlot][3]); DOF2_SetInt(file, "Veh7ComponentSlot4", PlayerInfo[playerid][pVeh7ComponentSlot][4]); DOF2_SetInt(file, "Veh7ComponentSlot5", PlayerInfo[playerid][pVeh7ComponentSlot][5]); DOF2_SetInt(file, "Veh7ComponentSlot6", PlayerInfo[playerid][pVeh7ComponentSlot][6]); DOF2_SetInt(file, "Veh7ComponentSlot7", PlayerInfo[playerid][pVeh7ComponentSlot][7]); DOF2_SetInt(file, "Veh7ComponentSlot8", PlayerInfo[playerid][pVeh7ComponentSlot][8]); DOF2_SetInt(file, "Veh7ComponentSlot9", PlayerInfo[playerid][pVeh7ComponentSlot][9]); DOF2_SetInt(file, "Veh7ComponentSlot10", PlayerInfo[playerid][pVeh7ComponentSlot][10]); DOF2_SetInt(file, "Veh7ComponentSlot11", PlayerInfo[playerid][pVeh7ComponentSlot][11]); DOF2_SetInt(file, "Veh7ComponentSlot12", PlayerInfo[playerid][pVeh7ComponentSlot][12]); DOF2_SetInt(file, "Veh7ComponentSlot13", PlayerInfo[playerid][pVeh7ComponentSlot][13]); DOF2_SetInt(file, "Vehicle8", PlayerInfo[playerid][pVehicle][8]); DOF2_SetInt(file, "Veh8Color1", PlayerInfo[playerid][pVeh8Color][0]); DOF2_SetInt(file, "Veh8Color2", PlayerInfo[playerid][pVeh8Color][1]); DOF2_SetInt(file, "Veh8ComponentSlot0", PlayerInfo[playerid][pVeh8ComponentSlot][0]); DOF2_SetInt(file, "Veh8ComponentSlot1", PlayerInfo[playerid][pVeh8ComponentSlot][1]); DOF2_SetInt(file, "Veh8ComponentSlot2", PlayerInfo[playerid][pVeh8ComponentSlot][2]); DOF2_SetInt(file, "Veh8ComponentSlot3", PlayerInfo[playerid][pVeh8ComponentSlot][3]); DOF2_SetInt(file, "Veh8ComponentSlot4", PlayerInfo[playerid][pVeh8ComponentSlot][4]); DOF2_SetInt(file, "Veh8ComponentSlot5", PlayerInfo[playerid][pVeh8ComponentSlot][5]); DOF2_SetInt(file, "Veh8ComponentSlot6", PlayerInfo[playerid][pVeh8ComponentSlot][6]); DOF2_SetInt(file, "Veh8ComponentSlot7", PlayerInfo[playerid][pVeh8ComponentSlot][7]); DOF2_SetInt(file, "Veh8ComponentSlot8", PlayerInfo[playerid][pVeh8ComponentSlot][8]); DOF2_SetInt(file, "Veh8ComponentSlot9", PlayerInfo[playerid][pVeh8ComponentSlot][9]); DOF2_SetInt(file, "Veh8ComponentSlot10", PlayerInfo[playerid][pVeh8ComponentSlot][10]); DOF2_SetInt(file, "Veh8ComponentSlot11", PlayerInfo[playerid][pVeh8ComponentSlot][11]); DOF2_SetInt(file, "Veh8ComponentSlot12", PlayerInfo[playerid][pVeh8ComponentSlot][12]); DOF2_SetInt(file, "Veh8ComponentSlot13", PlayerInfo[playerid][pVeh8ComponentSlot][13]); DOF2_SetInt(file, "Vehicle9", PlayerInfo[playerid][pVehicle][9]); DOF2_SetInt(file, "Veh9Color1", PlayerInfo[playerid][pVeh9Color][0]); DOF2_SetInt(file, "Veh9Color2", PlayerInfo[playerid][pVeh9Color][1]); DOF2_SetInt(file, "Veh9ComponentSlot0", PlayerInfo[playerid][pVeh9ComponentSlot][0]); DOF2_SetInt(file, "Veh9ComponentSlot1", PlayerInfo[playerid][pVeh9ComponentSlot][1]); DOF2_SetInt(file, "Veh9ComponentSlot2", PlayerInfo[playerid][pVeh9ComponentSlot][2]); DOF2_SetInt(file, "Veh9ComponentSlot3", PlayerInfo[playerid][pVeh9ComponentSlot][3]); DOF2_SetInt(file, "Veh9ComponentSlot4", PlayerInfo[playerid][pVeh9ComponentSlot][4]); DOF2_SetInt(file, "Veh9ComponentSlot5", PlayerInfo[playerid][pVeh9ComponentSlot][5]); DOF2_SetInt(file, "Veh9ComponentSlot6", PlayerInfo[playerid][pVeh9ComponentSlot][6]); DOF2_SetInt(file, "Veh9ComponentSlot7", PlayerInfo[playerid][pVeh9ComponentSlot][7]); DOF2_SetInt(file, "Veh9ComponentSlot8", PlayerInfo[playerid][pVeh9ComponentSlot][8]); DOF2_SetInt(file, "Veh9ComponentSlot9", PlayerInfo[playerid][pVeh9ComponentSlot][9]); DOF2_SetInt(file, "Veh9ComponentSlot10", PlayerInfo[playerid][pVeh9ComponentSlot][10]); DOF2_SetInt(file, "Veh9ComponentSlot11", PlayerInfo[playerid][pVeh9ComponentSlot][11]); DOF2_SetInt(file, "Veh9ComponentSlot12", PlayerInfo[playerid][pVeh9ComponentSlot][12]); DOF2_SetInt(file, "Veh9ComponentSlot13", PlayerInfo[playerid][pVeh9ComponentSlot][13]); DOF2_SetInt(file, "House0", PlayerInfo[playerid][pHouse][0]); DOF2_SetInt(file, "House1", PlayerInfo[playerid][pHouse][1]); DOF2_SetInt(file, "House2", PlayerInfo[playerid][pHouse][2]); DOF2_SetInt(file, "House3", PlayerInfo[playerid][pHouse][3]); DOF2_SetInt(file, "House4", PlayerInfo[playerid][pHouse][4]); DOF2_SetInt(file, "House5", PlayerInfo[playerid][pHouse][5]); DOF2_SetInt(file, "House6", PlayerInfo[playerid][pHouse][6]); DOF2_SetInt(file, "House7", PlayerInfo[playerid][pHouse][7]); DOF2_SetInt(file, "House8", PlayerInfo[playerid][pHouse][8]); DOF2_SetInt(file, "House9", PlayerInfo[playerid][pHouse][9]); return 1; }