07.02.2015, 21:24
I have save system with health and armor, and when next time connect, player will be have old health and armor. but , when admin going on admin duty, server set him health and armor to 99999,i want make when is player on duty, server dont saving him health and armor to player .ini file, will be have old health and armor.
i make this, but, dont working.
sorry for my bad english. thanks
i make this, but, dont working.
Код:
public SavePlayer(playerid) { if(IsLogged[playerid] == true){ { new Float:health, Float:armour; GetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armour); // new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]); PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); INI_WriteInt(File,"Level",GetPlayerScore(playerid)); INI_WriteInt(File,"BankCash",PlayerInfo[playerid][pBankCash]); INI_WriteInt(File,"BankCard",PlayerInfo[playerid][pBankCard]); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]); { if(gaDuty[playerid] != 0) { INI_WriteFloat(File, "Health", health); INI_WriteFloat(File, "Armour", armour); } } INI_WriteFloat(File, "SpawnX", PlayerInfo[playerid][pSpawnX]); INI_WriteFloat(File, "SpawnY", PlayerInfo[playerid][pSpawnY]); INI_WriteFloat(File, "SpawnZ", PlayerInfo[playerid][pSpawnZ]); INI_WriteFloat(File, "SpawnFacingAngle", PlayerInfo[playerid][pSpawnFacingAngle]); INI_Close(File); } } return 1; }