YINI Problem
#10

Quote:
Originally Posted by RockingCamman
View Post
please help me guys
i had to go offline :\
ok so now that you have replaced the script i told you now where ever you want to load the players date put this
pawn Code:
new name[MAX_PLAYER_NAME],file[80];GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"/THE LOCATION OF THE SAVE FILE/%s.txt",name);//NOTE: make sure to change the location
INI_ParseFile(file, "LoadUser_data", false, true, playerid, true, false);//This will perse the files!
//Now to laod them do this
LoadPlayerData(playerid);//you put this after the date has been persed

//Now put this callback at teh botttom of your script!
forward LoadPlayerData(playerid);
public LoadPlayerData(playerid)
{
new name[MAX_PLAYER_NAME],file[80];GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"/THE LOCATION OF THE SAVE FILE/%s.txt",name);//NOTE: make sure to change the location
if(fexist(file))
    {
        PlayerInfo[playerid][LEVEL] = GetPVarInt(playerid, "Level");
        PlayerInfo[playerid][ADMINLEVEL] = GetPVarInt(playerid, "Admin Level");
        PlayerInfo[playerid][WIRED] = GetPVarInt(playerid, "Wired");
        PlayerInfo[playerid][JAILED] = GetPVarInt(playerid, "Jailed");
        PlayerInfo[playerid][JOB] = GetPVarInt(playerid, "Job");
        PlayerInfo[playerid][FACTION] = GetPVarInt(playerid, "Faction");
        PlayerInfo[playerid][CAR] = GetPVarInt(playerid, "Car");
        PlayerInfo[playerid][PHONE] = GetPVarInt(playerid, "Phone");
        PlayerInfo[playerid][PHONEBOOK] = GetPVarInt(playerid, "Phonebook");
        PlayerInfo[playerid][MASK] = GetPVarInt(playerid, "Mask");
        PlayerInfo[playerid][CONDOM] = GetPVarInt(playerid, "Condom");
        PlayerInfo[playerid][GUNSKILL] = GetPVarInt(playerid, "Gun Skill");
        PlayerInfo[playerid][JOBSKILL] = GetPVarInt(playerid, "Job Skill");
        PlayerInfo[playerid][CARLIC] = GetPVarInt(playerid, "CarLic");
        PlayerInfo[playerid][FLYLIC] = GetPVarInt(playerid, "FlyLic");
        PlayerInfo[playerid][GUNLIC] = GetPVarInt(playerid, "GunLic");
        PlayerInfo[playerid][FACRANK] = GetPVarInt(playerid, "FacRank");
        GivePlayerMoney(playerid,GetPVarInt(playerid, "Money"));
    }
}
return 1;
}
Reply


Messages In This Thread
YINI Problem - by Swyft™ - 27.10.2011, 20:27
Re: YINI Problem - by park4bmx - 27.10.2011, 20:35
Re: YINI Problem - by Swyft™ - 27.10.2011, 20:40
Re: YINI Problem - by park4bmx - 27.10.2011, 20:48
Re: YINI Problem - by Swyft™ - 27.10.2011, 20:55
Re: YINI Problem - by park4bmx - 27.10.2011, 20:57
Re: YINI Problem - by Swyft™ - 27.10.2011, 21:11
Re: YINI Problem - by Swyft™ - 28.10.2011, 02:18
Re: YINI Problem - by Swyft™ - 28.10.2011, 04:56
Re: YINI Problem - by park4bmx - 28.10.2011, 09:41

Forum Jump:


Users browsing this thread: 1 Guest(s)