17.09.2012, 12:04
There you are:
pawn Код:
public SavePlayerData(playerid)
{
if(Player[playerid][Authenticated] == 1)
{
GetPlayerPos(playerid, Player[playerid][LastX], Player[playerid][LastY], Player[playerid][LastZ]);
GetPlayerHealth(playerid, Player[playerid][LastHealth]);
GetPlayerArmour(playerid, Player[playerid][LastArmour]);
Player[playerid][LastInterior] = GetPlayerInterior(playerid);
GetPlayerWeaponData(playerid, Player[playerid][SMGWeapon], Player[playerid][SMGWeapon], Player[playerid][SMGWeaponAmmo]);
new string[128];
if(Player[playerid][AdminDuty] >= 1)
{
format(string, sizeof(string), "Accounts/%s.ini", Player[playerid][NormalName]);
}
else
{
format(string, sizeof(string), "Accounts/%s.ini", GetName(playerid));
}
if(!fexist(string))
{
dini_Create(string);
}
GetPlayerAmmo(playerid);
dini_Set(string, "Password", Player[playerid][Password]);
dini_IntSet(string, "SpawnSelection", Player[playerid][SpawnSelection]);
dini_IntSet(string, "AdminLevel", Player[playerid][AdminLevel]);
dini_FloatSet(string, "LastX", Player[playerid][LastX]);
dini_FloatSet(string, "LastY", Player[playerid][LastY]);
dini_FloatSet(string, "LastZ", Player[playerid][LastZ]);
dini_IntSet(string, "LastWorld", Player[playerid][LastWorld]);
dini_IntSet(string, "LastInterior", Player[playerid][LastInterior]);
if(Player[playerid][AdminDuty] == 0)
{
dini_IntSet(string, "LastSkin", GetPlayerSkin(playerid));
}
dini_FloatSet(string, "LastHealth", Player[playerid][LastHealth]);
dini_FloatSet(string, "LastArmour", Player[playerid][LastArmour]);
dini_IntSet(string, "LastLoginMinute", Player[playerid][LastLoginMinute]);
dini_IntSet(string, "LastLoginHour", Player[playerid][LastLoginHour]);
dini_IntSet(string, "LastLoginDay", Player[playerid][LastLoginDay]);
dini_IntSet(string, "LastLoginMonth", Player[playerid][LastLoginMonth]);
dini_IntSet(string, "LastLoginYear", Player[playerid][LastLoginYear]);
dini_Set(string, "LastIP", Player[playerid][LastIP]);
dini_IntSet(string, "Group", Player[playerid][Group]);
dini_IntSet(string, "GroupRank", Player[playerid][GroupRank]);
dini_IntSet(string, "House", Player[playerid][House]);
dini_IntSet(string, "Banned", Player[playerid][Banned]);
dini_IntSet(string, "Muted", Player[playerid][Muted]);
dini_IntSet(string, "Money", Player[playerid][Money]);
dini_IntSet(string, "FishBait", Player[playerid][FishBait]);
dini_IntSet(string, "FishtoEat", Player[playerid][FishtoEat]);
dini_IntSet(string, "FishingLine", Player[playerid][FishingLine]);
dini_IntSet(string, "FarmEmployed", Player[playerid][FarmEmployed]);
dini_IntSet(string, "FarmOwner", Player[playerid][FarmEmployed]);
dini_IntSet(string, "SMGWeapon", Player[playerid][SMGWeapon]);
dini_IntSet(string, "Toolkit", Player[playerid][Toolkit]);
dini_IntSet(string, "SevQuiz", Player[playerid][SevQuiz]);
dini_IntSet(string, "SMGWeaponAmmo", Player[playerid][SMGWeaponAmmo]);
dini_IntSet(string, "PistolWeapon", Player[playerid][PistolWeapon]);
dini_IntSet(string, "PistolWeaponAmmo", Player[playerid][PistolWeaponAmmo]);
dini_IntSet(string, "RifleWeapon", Player[playerid][RifleWeapon]);
dini_IntSet(string, "RifleWeaponAmmo", Player[playerid][RifleWeaponAmmo]);
dini_IntSet(string, "AssaultWeapon", Player[playerid][AssaultWeapon]);
dini_IntSet(string, "AssaultWeaponAmmo", Player[playerid][AssaultWeaponAmmo]);
dini_IntSet(string, "ShotgunWeapon", Player[playerid][ShotgunWeapon]);
dini_IntSet(string, "ShotgunAmmo", Player[playerid][ShotgunWeaponAmmo]);
dini_IntSet(string, "SprayWeapon", Player[playerid][SprayWeapon]);
dini_IntSet(string, "SprayWeaponAmmo", Player[playerid][SprayWeaponAmmo]);
dini_IntSet(string, "CombatWeapon", Player[playerid][CombatWeapon]);
dini_IntSet(string, "CombatWeaponAmmo", Player[playerid][CombatWeaponAmmo]);
dini_IntSet(string, "ThrownWeapon", Player[playerid][ThrownWeapon]);
dini_IntSet(string, "ThrownWeaponAmmo", Player[playerid][ThrownWeaponAmmo]);
dini_Set(string, "Warning1", Player[playerid][Warning1]);
dini_Set(string, "Warning2", Player[playerid][Warning2]);
dini_Set(string, "Warning3", Player[playerid][Warning3]);
dini_IntSet(string, "Identity", Player[playerid][Identity]);
dini_IntSet(string, "Age", Player[playerid][Age]);
dini_IntSet(string, "ContractPrice", Player[playerid][ContractPrice]);
dini_Set(string, "Contract", Player[playerid][Contract]);
dini_IntSet(string, "PrisonDuration", Player[playerid][PrisonDuration]);
dini_IntSet(string, "PrisonID", Player[playerid][PrisonID]);
dini_IntSet(string, "Tutorial", Player[playerid][Tutorial]);
dini_IntSet(string, "Hospitalized", Player[playerid][Hospitalized]);
dini_IntSet(string, "CriminalOffences", Player[playerid][CriminalOffences]);
dini_Set(string, "Offence1", Player[playerid][Offence1]);
dini_Set(string, "Offence2", Player[playerid][Offence2]);
dini_Set(string, "Offence3", Player[playerid][Offence3]);
dini_Set(string, "Offence4", Player[playerid][Offence4]);
dini_Set(string, "Offence5", Player[playerid][Offence5]);
dini_Set(string, "Offence6", Player[playerid][Offence6]);
dini_IntSet(string, "Gender", Player[playerid][Gender]);
dini_IntSet(string, "Job", Player[playerid][Job]);
dini_IntSet(string, "Materials", Player[playerid][Materials]);
dini_IntSet(string, "AdminActions", Player[playerid][AdminActions]);
dini_IntSet(string, "SecondsLoggedIn", Player[playerid][SecondsLoggedIn]);
dini_IntSet(string, "BankMoney", Player[playerid][BankMoney]);
dini_IntSet(string, "Crack", Player[playerid][Cocaine]);
dini_IntSet(string, "Pot", Player[playerid][Pot]);
dini_IntSet(string, "nMuted", Player[playerid][nMuted]);
dini_IntSet(string, "Business", Player[playerid][Business]);
dini_IntSet(string, "PhoneN", Player[playerid][PhoneN]);
dini_IntSet(string, "PlayingHours", Player[playerid][PlayingHours]);
dini_IntSet(string, "PhoneBook", Player[playerid][PhoneBook]);
dini_IntSet(string, "InabilityToMatrun", Player[playerid][InabilityToMatrun]);
dini_IntSet(string, "InabilityToDropCar", Player[playerid][InabilityToDropCar]);
dini_IntSet(string, "CantFish", Player[playerid][CantFish]);
dini_IntSet(string, "CollectedFish", Player[playerid][CollectedFish]);
dini_FloatSet(string, "CarX", Player[playerid][CarX]);
dini_FloatSet(string, "CarY", Player[playerid][CarY]);
dini_FloatSet(string, "CarZ", Player[playerid][CarZ]);
dini_FloatSet(string, "CarZAngle", Player[playerid][CarZAngle]);
dini_IntSet(string, "CarModel", Player[playerid][PlayerCarModel]);
dini_IntSet(string, "CarCol1", Player[playerid][CarCol1]);
dini_IntSet(string, "CarCol2", Player[playerid][CarCol2]);
dini_IntSet(string, "Rope", Player[playerid][Rope]);
dini_IntSet(string, "Rags", Player[playerid][Rags]);
dini_IntSet(string, "FailedHits", Player[playerid][FailedHits]);
dini_IntSet(string, "SuccessfulHits", Player[playerid][SuccessfulHits]);
dini_IntSet(string, "CarLock", Player[playerid][LockedCar]);
dini_IntSet(string, "Radio", Player[playerid][HasRadio]);
dini_IntSet(string, "CollegeMedia", Player[playerid][CollegeMedia]);
dini_IntSet(string, "CollegeLaw", Player[playerid][CollegeLaw]);
dini_IntSet(string, "CollegeEng", Player[playerid][CollegeEng]);
dini_IntSet(string, "CollegeMath", Player[playerid][CollegeMath]);
dini_IntSet(string, "CollegeChem", Player[playerid][CollegeChem]);
dini_Set(string, "MarriedTo", Player[playerid][MarriedTo]);
dini_IntSet(string, "FightBox", Player[playerid][FightBox]);
dini_IntSet(string, "FightKungfu", Player[playerid][FightKungfu]);
dini_IntSet(string, "FightGrabkick", Player[playerid][FightGrabkick]);
dini_IntSet(string, "FightKneehead", Player[playerid][FightKneehead]);
dini_IntSet(string, "FightElbow", Player[playerid][FightElbow]);
dini_IntSet(string, "VipRank", Player[playerid][VipRank]);
dini_IntSet(string, "WalkieTalkie", Player[playerid][WalkieTalkie]);
dini_IntSet(string, "BankStatus", Player[playerid][BankStatus]);
dini_IntSet(string, "PhoneCredit", Player[playerid][PhoneCredit]);
dini_IntSet(string, "PlayerSkinSlot1", Player[playerid][PlayerSkinSlot1]);
dini_IntSet(string, "PlayerSkinSlot2", Player[playerid][PlayerSkinSlot2]);
dini_IntSet(string, "PlayerSkinSlot3", Player[playerid][PlayerSkinSlot3]);
dini_IntSet(string, "AdminPIN", Player[playerid][AdminPIN]);
dini_Set(string, "AdminName", Player[playerid][AdminName]);
dini_Set(string, "NormalName", Player[playerid][NormalName]);
dini_IntSet(string, "AdminSkin", Player[playerid][AdminSkin]);
dini_Set(string, "Accent", Player[playerid][Accent]);
dini_IntSet(string, "WalkieFrequency", Player[playerid][WalkieFrequency]);
dini_IntSet(string, "PortableRadio", Player[playerid][PortableRadio]);
dini_Set(string, "Note", Player[playerid][Note]);
dini_IntSet(string, "CarPaintJobID", Player[playerid][CarPaintJobID]);
dini_IntSet(string, "MeActions", Player[playerid][MeActions]);
dini_IntSet(string, "AdsPlaced", Player[playerid][AdsPlaced]);
dini_IntSet(string, "MatrunsExecuted", Player[playerid][MatrunsExecuted]);
dini_IntSet(string, "HasMapApp", Player[playerid][HasMapApp]);
dini_IntSet(string, "HasAdApp", Player[playerid][HasAdApp]);
dini_IntSet(string, "HasPagesApp", Player[playerid][HasPagesApp]);
dini_IntSet(string, "HasRadioApp", Player[playerid][HasRadioApp]);
dini_IntSet(string, "AnsweredQuizQuestions", Player[playerid][AnsweredQuizQuestions]);
dini_IntSet(string, "AchievementRank", Player[playerid][AchievementRank]);
dini_IntSet(string, "Tester", Player[playerid][Tester]);
dini_IntSet(string, "oMuted", Player[playerid][oMuted]);
dini_IntSet(string, "PlayerCarModel2", Player[playerid][PlayerCarModel2]);
dini_IntSet(string, "PlayerCarModel3", Player[playerid][PlayerCarModel3]);
dini_FloatSet(string, "Car2ZAngle", Player[playerid][Car2ZAngle]);
dini_FloatSet(string, "Car3ZAngle", Player[playerid][Car3ZAngle]);
dini_IntSet(string, "Car2Col1", Player[playerid][Car2Col1]);
dini_IntSet(string, "Car2Col2", Player[playerid][Car2Col2]);
dini_IntSet(string, "Car3Col1", Player[playerid][Car3Col1]);
dini_IntSet(string, "Car3Col2", Player[playerid][Car3Col2]);
dini_IntSet(string, "Car2PaintJobID", Player[playerid][Car2PaintJobID]);
dini_IntSet(string, "Car3PaintJobID", Player[playerid][Car3PaintJobID]);
dini_FloatSet(string, "Car2X", Player[playerid][Car2X]);
dini_FloatSet(string, "Car2Y", Player[playerid][Car2Y]);
dini_FloatSet(string, "Car2Z", Player[playerid][Car2Z]);
dini_FloatSet(string, "Car3X", Player[playerid][Car3X]);
dini_FloatSet(string, "Car3Y", Player[playerid][Car3Y]);
dini_FloatSet(string, "Car3Z", Player[playerid][Car3Z]);
dini_IntSet(string, "CheckBalance", Player[playerid][CheckBalance]);
dini_IntSet(string, "LockedCar2", Player[playerid][LockedCar2]);
dini_IntSet(string, "LockedCar3", Player[playerid][LockedCar3]);
dini_IntSet(string, "ReportBanStatus", Player[playerid][ReportBanStatus]);
dini_IntSet(string, "AdminDuty", Player[playerid][AdminDuty]);
}
return 1;
}