18.03.2012, 15:59
pawn Код:
public SaveUser(playerid)
{
if(IsLogged[playerid] == 0) return 0;
GetPlayerHealth(playerid, PlayerInfo[playerid][Health]);
GetPlayerArmour(playerid, PlayerInfo[playerid][Armour]);
GetPlayerPos(playerid, PlayerInfo[playerid][Pos][0], PlayerInfo[playerid][Pos][1], PlayerInfo[playerid][Pos][2]);
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][Pos][3]);
PlayerInfo[playerid][Money] = GetPlayerMoney(playerid);
PlayerInfo[playerid][Skin] = GetPlayerSkin(playerid);
dini_IntSet(Userfile, "Admin", PlayerInfo[playerid][Admin]);
dini_IntSet(Userfile, "Money", PlayerInfo[playerid][Money]);
dini_IntSet(Userfile, "Skin", PlayerInfo[playerid][Skin]);
dini_IntSet(Userfile, "New", PlayerInfo[playerid][New]);
if(PlayerInfo[playerid][Health] != 0) dini_FloatSet(Userfile, "Health", PlayerInfo[playerid][Health]);
if(PlayerInfo[playerid][Armour] != 0) dini_FloatSet(Userfile, "Armour", PlayerInfo[playerid][Armour]);
if(PlayerInfo[playerid][Pos][0] != 0) dini_FloatSet(Userfile, "X", PlayerInfo[playerid][Pos][0]);
if(PlayerInfo[playerid][Pos][1] != 0) dini_FloatSet(Userfile, "Y", PlayerInfo[playerid][Pos][1]);
if(PlayerInfo[playerid][Pos][2] != 0) dini_FloatSet(Userfile, "Z", PlayerInfo[playerid][Pos][2]);
if(PlayerInfo[playerid][Pos][3] != 0) dini_FloatSet(Userfile, "R", PlayerInfo[playerid][Pos][3]);
return 1;
}