new password[32], account[112], scored, Float:scoreds; format(account,sizeof(account),"Users/%s.ini",PlayerName[playerid]); new iniFile = ini_openFile(account); ini_getString(iniFile, "Password", password, 32); if(strcmp(inputtext, password, true) == 0) { ini_getInteger(iniFile, "Money", Player[playerid][pCashPlayer]); ini_getInteger(iniFile, "Score", scored); SetPlayerScore(playerid,scored); ini_getInteger(iniFile, "Police", scored); SetPVarInt(playerid,"pPolice",scored); ini_getInteger(iniFile, "Mafia", scored); SetPVarInt(playerid,"pMafia",scored); ini_getInteger(iniFile, "VIPg", scored); SetPVarInt(playerid,"pVIPg",scored); ini_getInteger(iniFile, "Admin", scored); SetPVarInt(playerid,"pAdminPlayer",scored); ini_getFloat(iniFile, "Pos_x", scoreds); SetPVarFloat(playerid,"pPos_x",scoreds); ini_getFloat(iniFile, "Pos_y", scoreds); SetPVarFloat(playerid,"pPos_y",scoreds); ini_getFloat(iniFile, "Pos_z", scoreds); SetPVarFloat(playerid,"pPos_z",scoreds); ini_getFloat(iniFile, "Pos_f", scoreds); SetPVarFloat(playerid,"pPos_f",scoreds); ini_getFloat(iniFile, "Car_x", scoreds); SetPVarFloat(playerid,"pCar_x",scoreds); ini_getFloat(iniFile, "Car_y", scoreds); SetPVarFloat(playerid,"pCar_y",scoreds); ini_getFloat(iniFile, "Car_z", scoreds); SetPVarFloat(playerid,"pCar_z",scoreds); ini_getFloat(iniFile, "Car_f", scoreds); SetPVarFloat(playerid,"pCar_f",scoreds); ini_getInteger(iniFile, "Banned", Player[playerid][pBanned]); ini_getInteger(iniFile, "Muted", Player[playerid][pMuted]); ini_getInteger(iniFile, "Jail", Player[playerid][pJail]); ini_getInteger(iniFile, "JTime", Player[playerid][pJTime]); ini_getInteger(iniFile, "Carid2", Player[playerid][pCarid2]); ini_getInteger(iniFile, "Cheater", Player[playerid][pCheater]); ini_getInteger(iniFile, "Vmashine", Player[playerid][pVcar]); ini_getInteger(iniFile, "CarÑolor", Player[playerid][pColor]); ini_getInteger(iniFile, "Wheel", scored); SetPVarInt(playerid, "wheel", scored); ini_getInteger(iniFile, "Vinil", Player[playerid][pVinil]); ini_getInteger(iniFile, "Neon", Player[playerid][pNeon]); ini_getInteger(iniFile, "Neonodn", Player[playerid][pNeonodn]); ini_getInteger(iniFile, "MuteTime", Player[playerid][pMuteTime]); ini_getInteger(iniFile, "Respects", Player[playerid][pRespects]); ini_getInteger(iniFile, "JailAdm", Player[playerid][pJailAdm]); ini_getInteger(iniFile, "MutedAdm", Player[playerid][pMutedAdm]); ini_getInteger(iniFile, "Mats", Player[playerid][pMats]); ini_getInteger(iniFile, "Matsh", Player[playerid][pMatsh]); ini_getInteger(iniFile, "Matsm", Player[playerid][pMatsm]); ini_getInteger(iniFile, "Matsd", Player[playerid][pMatsd]); ini_getInteger(iniFile, "Bon_d", Player[playerid][pBonus_d]); ini_getInteger(iniFile, "Speedom", Player[playerid][pSpeedom]); ini_getInteger(iniFile, "JailCop", Player[playerid][pJailCop]); ini_getInteger(iniFile, "JTimeCop", Player[playerid][pJTimeCop]); ini_getInteger(iniFile, "Zvezdi", Player[playerid][pZvezdi]); ini_getInteger(iniFile, "Int", Player[playerid][pInt]); ini_getInteger(iniFile, "Virt", Player[playerid][pVirt]); ini_getInteger(iniFile, "Skin", Player[playerid][pSkin]); ini_getInteger(iniFile, "Respsay", Player[playerid][pRespday]); ini_getInteger(iniFile, "DoubleDrift",Player[playerid][pDoubleDrift]); ini_getInteger(iniFile, "DoubleDriftTime",Player[playerid][pDoubleDriftTime]); ini_getInteger(iniFile, "NoCrash",Player[playerid][pNoCrash]); ini_getInteger(iniFile, "NoCrashTime",Player[playerid][pNoCrashTime]); }
new account[112]; format(account,sizeof(account), "Users/%s.ini", PlayerName[playerid]); new iniFile = ini_openFile(account); ini_setInteger(iniFile, "JTime", Player[playerid][pJTime]); ini_setInteger(iniFile, "Carid2", Player[playerid][pCarid2]); ini_setInteger(iniFile, "Cheater", Player[playerid][pCheater]); ini_setInteger(iniFile, "Vmashine", Player[playerid][pVcar]); ini_setInteger(iniFile, "CarÑolor", GetPVarInt(playerid,"color")); ini_setInteger(iniFile, "Wheel",GetPVarInt(playerid,"wheel")); ini_setInteger(iniFile, "Vinil",GetPVarInt(playerid,"vinil")); ini_setInteger(iniFile, "Neon",Player[playerid][pNeon]); ini_setInteger(iniFile, "Neonodn",Player[playerid][pNeonodn]); ini_setInteger(iniFile, "MuteTime",GetPVarInt(playerid,"mtime")); ini_setInteger(iniFile, "Respects",Player[playerid][pRespects]); ini_setInteger(iniFile, "JailAdm",Player[playerid][pJailAdm]); ini_setInteger(iniFile, "MutedAdm",Player[playerid][pMutedAdm]); ini_setInteger(iniFile, "Mats", Player[playerid][pMats]); ini_setInteger(iniFile, "Matsh", Player[playerid][pMatsh]); ini_setInteger(iniFile, "Matsm", Player[playerid][pMatsm]); ini_setInteger(iniFile, "Matsd", Player[playerid][pMatsd]); ini_setInteger(iniFile, "Money", GetPlayerCash(playerid)); ini_setInteger(iniFile, "Admin", GetPVarInt(playerid,"pAdminPlayer")); if(GetPlayerScore(playerid) != 0) {ini_setInteger(iniFile, "Score", GetPlayerScore(playerid));} ini_setFloat(iniFile, "Pos_x", GetPVarFloat(playerid,"pPos_x")); ini_setFloat(iniFile, "Pos_y", GetPVarFloat(playerid,"pPos_y")); ini_setFloat(iniFile, "Pos_z", GetPVarFloat(playerid,"pPos_z")); ini_setFloat(iniFile, "Pos_f", GetPVarFloat(playerid,"pPos_f")); ini_setInteger(iniFile, "Police", GetPVarInt(playerid,"pPolice")); ini_setInteger(iniFile, "Mafia", GetPVarInt(playerid,"pMafia")); ini_setInteger(iniFile, "Banned", Player[playerid][pBanned]); ini_setInteger(iniFile, "VIPg", GetPVarInt(playerid,"pVIPg")); ini_setInteger(iniFile, "Muted", Player[playerid][pMuted]); ini_setInteger(iniFile, "Jail", Player[playerid][pJail]); ini_setFloat(iniFile, "Car_x",GetPVarFloat(playerid,"pCar_x")); ini_setFloat(iniFile, "Car_y",GetPVarFloat(playerid,"pCar_y")); ini_setFloat(iniFile, "Car_z",GetPVarFloat(playerid,"pCar_z")); ini_setFloat(iniFile, "Car_f",GetPVarFloat(playerid,"pCar_f")); ini_setInteger(iniFile, "Bon_d",Player[playerid][pBonus_d]); ini_setInteger(iniFile, "Speedom",Player[playerid][pSpeedom]); ini_setInteger(iniFile, "JailCop", Player[playerid][pJailCop]); ini_setInteger(iniFile, "JTimeCop", Player[playerid][pJTimeCop]); ini_setInteger(iniFile, "Zvezdi", Player[playerid][pZvezdi]); ini_setInteger(iniFile, "Int", GetPlayerInterior(playerid)); ini_setInteger(iniFile, "Virt", GetPlayerVirtualWorld(playerid)); ini_setInteger(iniFile, "Respsay", Player[playerid][pRespday]); ini_setInteger(iniFile, "DoubleDrift",Player[playerid][pDoubleDrift]); ini_setInteger(iniFile, "DoubleDriftTime",Player[playerid][pDoubleDriftTime]); ini_setInteger(iniFile, "NoCrash",Player[playerid][pNoCrash]); ini_setInteger(iniFile, "NoCrashTime",Player[playerid][pNoCrashTime]); ini_setInteger(iniFile, "Garages",GetOwnedGarages(playerid)); ini_setInteger(iniFile, "Houses",GetOwnedHouses(playerid)); if(GetPlayerSkin(playerid) < 300){ini_setInteger(iniFile, "Skin", GetPlayerSkin(playerid));}
А как ещё о_О (это просто "временная" переменная, для перехода из файла в PvarInt)
Для "Integer" я использую переменную scored а я для "Float" используется scoreds |
printf(
"save(pCar_x: %.3f, pCar_y: %.3f, pCar_z: %.3f, pCar_x: pCar_f: %.3f,)",
GetPVarFloat(playerid,"pCar_x"),
GetPVarFloat(playerid,"pCar_y"),
GetPVarFloat(playerid,"pCar_z"),
GetPVarFloat(playerid,"pCar_f"),
);
ini_setFloat(iniFile, "Car_x",GetPVarFloat(playerid,"pCar_x"));
ini_setFloat(iniFile, "Car_y",GetPVarFloat(playerid,"pCar_y"));
ini_setFloat(iniFile, "Car_z",GetPVarFloat(playerid,"pCar_z"));
ini_setFloat(iniFile, "Car_f",GetPVarFloat(playerid,"pCar_f"));