Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public LoadPlayerData(playerid)
- {
- new name[MAX_PLAYER_NAME],file[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(file,sizeof(file),"saves/user/%s.ini",name);
- if(!fexist(file)) return;
- new tmpxp = dini_Int(file,"Xp");
- if(!tmpxp) return;
- SetPlayerScore(playerid,tmpxp);
- SetPlayerPos(playerid,dini_Float(file,"Pozicija_X"),dini_Float(file,"Pozicija_Y"),dini_Float(file,"Pozicija_Z"));
- SetPlayerInterior(playerid,dini_Int(file,"Interioras"));
- SetPlayerWantedLevel(playerid,dini_Int(file,"Ieskomumas"));
- ResetPlayerMoneyA(playerid);
- GivePlayerMoneyA(playerid,dini_Int(file,"Pinigai.Rankose"));
- SetPlayerVirtualWorld(playerid,dini_Int(file,"Virtualus.Pasaulis"));
- SetPVarInt(playerid, "Pinigai.Banke", dini_Int(file, "Pinigai.Banke"));
- playerDB[playerid][mobsas] = dini_Int(file,"Mobilus");
- SetPVarInt(playerid, "Narkotikai", dini_Int(file, "Narkotikai"));
- SetPVarInt(playerid, "Lytis", dini_Int(file, "Lytis"));
- SetPVarInt(playerid, "Drabuziai", dini_Int(file,"Drabuziai"));
- SetPVarInt(playerid, "Teises", dini_Int(file,"Teises"));
- SetPVarInt(playerid, "Naujokas", dini_Int(file,"Naujokas"));
- SetPVarInt(playerid, "Ginklas", dini_Int(file,"Ginklas"));
- SetPVarInt(playerid, "Ispejimai", dini_Int(file,"Ispejimai"));
- SetPVarInt(playerid, "Uniforma", dini_Int(file,"Uniforma"));
- SetPVarInt(playerid, "Uniformd", dini_Int(file,"Uniformd"));
- SetPVarInt(playerid, "Direktorius", dini_Int(file,"Direktorius"));
- SetPVarInt(playerid,"Kalejimo.Laikas", dini_Int(file,"Kalejimo.Laikas"));
- SetPVarInt(playerid, "Specialybe", dini_Int(file, "Darbas"));
- SetPVarInt(playerid, "Pastatas", dini_Int(file, "Pastatas"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas0"),dini_Int(file,"Ammo0"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas1"),dini_Int(file,"Ammo1"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas2"),dini_Int(file,"Ammo2"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas3"),dini_Int(file,"Ammo3"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas4"),dini_Int(file,"Ammo4"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas5"),dini_Int(file,"Ammo5"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas6"),dini_Int(file,"Ammo6"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas7"),dini_Int(file,"Ammo7"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas8"),dini_Int(file,"Ammo8"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas9"),dini_Int(file,"Ammo9"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas10"),dini_Int(file,"Ammo10"));
- GivePlayerWeapon(playerid,dini_Int(file,"Ginklas11"),dini_Int(file,"Ammo11"));
- //Checks that prevent lots of bandwith
- if(gSession==dini_Int(file,"Paskutine.Sesija"))
- {
- playerDB[playerid][pcar] = dini_Int(file,"Masina");
- if(playerDB[playerid][pcar] != -1)
- {
- if(strcmp(name,vehicleDB[playerDB[playerid][pcar]][owner_name],true) || !vehicleDB[playerDB[playerid][pcar]][locked]) playerDB[playerid][pcar]=-1;
- }
- }else{
- playerDB[playerid][pcar]=-1;
- }
- if(GetPVarInt(playerid, "Kalejimo.Laikas") > 0)
- {
- SetTimerEx("UnjailPlayer",GetPVarInt(playerid, "Kalejimo.Laikas")*1000,0,"iffffi",playerid,-1597.6338,716.4904,11.7759,341.3682,0);
- SetPVarInt(playerid, "Ikalintas", 1);
- }
- if(GetPVarInt(playerid, "Uniformd") == 1)
- SetPlayerSkin(playerid,GetPVarInt(playerid, "Uniforma"));
- else
- SetPlayerSkin(playerid,GetPVarInt(playerid, "Drabuziai"));
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement