25.07.2012, 20:39
Hello guys here is my Saving system
This is my stats command.
When I type /stats Ig it shows me this
Can any one help me fix it?
pawn Код:
public SavePlayer(playerid)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
new Float:sX, Float:sY, Float:sZ, Float:sA, Float:sH, Float:sAr;
GetPlayerPos(playerid, sX, sY, sZ);
GetPlayerFacingAngle(playerid, sA);
GetPlayerHealth(playerid, sH);
GetPlayerArmour(playerid, sAr);
INI_WriteInt(File, "Password", PlayerInfo[playerid][Password]);
INI_WriteInt(File, "Admin", PlayerInfo[playerid][Admin]);
INI_WriteInt(File, "Origin", PlayerInfo[playerid][Origin]);
INI_WriteInt(File, "Gender", PlayerInfo[playerid][Gender]);
INI_WriteInt(File, "Age", PlayerInfo[playerid][Age]);
INI_WriteFloat(File, "sPosX", sX);
INI_WriteFloat(File, "sPosY", sY);
INI_WriteFloat(File, "sPosZ", sZ);
INI_WriteFloat(File, "sPosA", sA);
INI_WriteFloat(File, "sHealth", sH);
INI_WriteFloat(File, "sArmor", sAr);
INI_WriteInt(File, "Money", PlayerInfo[playerid][Money]);
INI_WriteInt(File, "BankBalance", PlayerInfo[playerid][BankBalance]);
INI_WriteInt(File, "BankPin", PlayerInfo[playerid][BankPin]);
INI_WriteInt(File, "Cellphone", PlayerInfo[playerid][Cellphone]);
INI_WriteInt(File, "HouseID", PlayerInfo[playerid][HouseID]);
INI_WriteInt(File, "CarID", PlayerInfo[playerid][CarID]);
INI_WriteInt(File, "Gun1", 0);
INI_WriteInt(File, "Gun2", 0);
INI_WriteInt(File, "Gun3", 0);
INI_WriteInt(File, "Gun4", 0);
INI_WriteInt(File, "Gun5", 0);
INI_WriteInt(File, "Gun6", 0);
INI_WriteInt(File, "Gun7", 0);
INI_WriteInt(File, "Gun8", 0);
INI_WriteInt(File, "Gun9", 0);
INI_WriteInt(File, "Gun10", 0);
INI_WriteInt(File, "Gun11", 0);
INI_WriteInt(File, "Gun12", 0);
INI_WriteInt(File, "Gun13", 0);
INI_WriteInt(File, "WTChannel", PlayerInfo[playerid][WTChannel]);
INI_WriteInt(File, "Faction", PlayerInfo[playerid][Faction]);
INI_WriteInt(File, "FLeader", PlayerInfo[playerid][FLeader]);
INI_WriteInt(File, "Job", PlayerInfo[playerid][Job]);
INI_WriteInt(File, "sInterior", GetPlayerInterior(playerid));
INI_WriteInt(File, "sVW", GetPlayerVirtualWorld(playerid));
INI_WriteInt(File, "Skin", PlayerInfo[playerid][Skin]);
INI_WriteInt(File, "Muted", PlayerInfo[playerid][Muted]);
INI_WriteInt(File, "nMute", PlayerInfo[playerid][nMute]);
INI_WriteInt(File, "Helper", PlayerInfo[playerid][Helper]);
INI_WriteInt(File, "Developer", PlayerInfo[playerid][Developer]);
INI_WriteInt(File, "Wolf", PlayerInfo[playerid][Wolf]);
INI_WriteInt(File, "RentingID", PlayerInfo[playerid][RentingID]);
INI_Close(File);
gPlayerLoggedIn[playerid] = 0;
return 1;
}
pawn Код:
YCMD:stats(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
new admin = PlayerInfo[playerid][Admin];
new Origin = PlayerInfo[playerid][Origin];
new Skin = PlayerInfo[playerid][Skin];
new Developer = PlayerInfo[playerid][Developer];
new Money = PlayerInfo[playerid][Money];
new Age = PlayerInfo[playerid][Age];
new Wolf = PlayerInfo[playerid][Wolf];
new Gender = PlayerInfo[playerid][Gender];
new password = PlayerInfo[playerid][Password];
new string[500];
format(string,sizeof(string)," Admin: %d | Origin: %d | Skin: %d | Developer: %d | Money: %d | Age: %d | Gender: %d |Password: %s |",Admin,Origin,Skin,Developer,Money,Age,Gender,password);
SendClientMessage(playerid,COLOR_WHITE,string);
}
return 1;
}
Код:
Admin: 1 | Origin: 2 | Skin: 36 | Developer: 40 | Money: 11 | Age: 4 | Gender: 3 |Password: џ |