30.09.2012, 21:48
i need help saving stats under gm int when the gamemode closes and when the gamemode restart and saving player pos
i deleted most of it for person reasons can anyone help save on gmx and when gamemode closes
pawn Код:
public SaveStats(playerid)
{
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
GetPlayerFacingAngle(playerid,PlayerInfo[playerid][pA]);
GetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteFloat(File, "X", PlayerInfo[playerid][pX]);
INI_WriteFloat(File, "Y", PlayerInfo[playerid][pY]);
INI_WriteFloat(File, "Z", PlayerInfo[playerid][pZ]);
INI_WriteFloat(File, "A", PlayerInfo[playerid][pA]);
INI_WriteInt(File, "Int", PlayerInfo[playerid][pInt]);
INI_WriteInt(File, "VW", PlayerInfo[playerid][pVW]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
}