[POMOC] Cuvanje statsa

Započeo Streetboy, Novembar 21, 2012, 15:19:26 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Raven's edit
Detaljan opis problema: Kako napraviti da se statsi sacuvaju i bez izlaska preko /q ?
Dio skripte: dacu sta treba...
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

Pa samo pokreni neki timer koji ce funkciju za spremanje pokrenuti svakih X minuta.

http://wiki.sa-mp.com/wiki/SetTimer


RESPECT 4 EVER: John, GLC,bAndzi, Nikola, Sop, Zoki, Bruno_Venuti, Mele, Luka P,ExtremePower,Wang(neki kineski frajer)

NAJBOLJI CITATI:
Citat: [GF]Alive poslato Jun 24, 2010, 18:20:19 POSLE PODNE
Paizte ljud mozda je KayLoger! ! !
MOJI RADOVI:
[FS]Trofeji

jel mislis na levele i to daj mi kako ti je definirano za level recimo Level ili pLevel

Citat: LordShigi poslato Novembar 21, 2012, 15:27:39 POSLE PODNE
Pa samo pokreni neki timer koji ce funkciju za spremanje pokrenuti svakih X minuta.

http://wiki.sa-mp.com/wiki/SetTimer
Nije to ''samo'' ako mozes daj mi primjer...

Citat: ivica158 poslato Novembar 21, 2012, 15:29:53 POSLE PODNE
jel mislis na levele i to daj mi kako ti je definirano za level recimo Level ili pLevel
Na lvl i pare i poziciju i sve....Inace jeste pLevel je kao i u obicnom ravensu..

daj mi sve iz onplayerregister publica onplayerupdate publica i onplayerlogin publica i stavi mi tu sta zelis da ti se sprema i kako ti je sta definirano pa cemo videjti ;)

public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[64];
new string[128];
new playername3[MAX_PLAYER_NAME];
new playersip[24];
GetPlayerName(playerid, playername3, sizeof(playername3));
GetPlayerIp(playerid, playersip, sizeof(playersip));
format(string3, sizeof(string3), "LARP/Users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
    strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
    new var[176];
format(var, 128, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 128, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
                format(var, 128, "Spawn=%d\n",PlayerInfo[playerid][pSpawn]);fwrite(hFile, var);
format(var, 128, "GameSageLevel=%d\n",PlayerInfo[playerid][pGameSage]);fwrite(hFile, var);
format(var, 128, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
format(var, 128, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 128, "RegularRank=%d\n",PlayerInfo[playerid][pRegularRank]);fwrite(hFile, var);
format(var, 128, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 128, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectSeconds]);fwrite(hFile, var);
format(var, 128, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
format(var, 128, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
format(var, 128, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
                format(var, 128, "GPS=%d\n",PlayerInfo[playerid][pGPS]);fwrite(hFile, var);
format(var, 128, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
format(var, 128, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
format(var, 128, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
                format(var, 128, "Frozen=%d\n",PlayerInfo[playerid][pFrozen]);fwrite(hFile, var);
                format(var, 128, "Blind=%d\n",PlayerInfo[playerid][pBlind]);fwrite(hFile, var);
format(var, 128, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
                PlayerInfo[playerid][pCash] = ScriptMoney[playerid];
format(var, 128, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
format(var, 128, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
format(var, 128, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
format(var, 128, "CrimeReason=%s\n",PlayerInfo[playerid][pCrimeReason]);fwrite(hFile, var);
format(var, 128, "Wanted=%d\n",PlayerInfo[playerid][pWanted]);fwrite(hFile, var);
format(var, 128, "WantedLevel=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var);
format(var, 128, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 128, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
                format(var, 128, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
format(var, 128, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
format(var, 128, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 128, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
format(var, 128, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
format(var, 128, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
format(var, 128, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
format(var, 128, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
format(var, 128, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
format(var, 128, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
format(var, 128, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
format(var, 128, "CanRobTime=%d\n",PlayerInfo[playerid][pRobTime]);fwrite(hFile, var);
format(var, 128, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
format(var, 128, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
format(var, 128, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
format(var, 128, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
format(var, 128, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
format(var, 128, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
format(var, 128, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
format(var, 128, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
format(var, 128, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
format(var, 128, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
format(var, 128, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
format(var, 128, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
format(var, 128, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
format(var, 128, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
format(var, 128, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
format(var, 128, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
format(var, 128, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
format(var, 128, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
format(var, 128, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
format(var, 128, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
format(var, 128, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
                format(var, 128, "pArmour=%.1f\n",PlayerInfo[playerid][pArmour]);fwrite(hFile, var);
format(var, 128, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
format(var, 128, "InteriorNr=%d\n",PlayerInfo[playerid][pInteriorNr]);fwrite(hFile, var);
format(var, 128, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
format(var, 128, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
format(var, 128, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
format(var, 128, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
format(var, 128, "Car=%d\n",PlayerInfo[playerid][pPcarkey]);fwrite(hFile, var);
                format(var, 128, "Car2=%d\n",PlayerInfo[playerid][pPcarkey2]);fwrite(hFile, var);
format(var, 128, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 128, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
format(var, 128, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
format(var, 128, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
format(var, 128, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
                format(var, 128, "Passport=%d\n",PlayerInfo[playerid][pPassport]);fwrite(hFile, var);
format(var, 128, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                format(var, 128, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 128, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 128, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
format(var, 128, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
format(var, 128, "CopLic=%d\n",PlayerInfo[playerid][pCopLic]);fwrite(hFile, var);
format(var, 128, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
format(var, 128, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 128, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
format(var, 128, "Watch=%d\n",PlayerInfo[playerid][pWatch]);fwrite(hFile, var);
format(var, 128, "Crashed=%d\n",PlayerInfo[playerid][pCrashed]);fwrite(hFile, var);
format(var, 128, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
format(var, 128, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
format(var, 128, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
format(var, 128, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
format(var, 128, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
format(var, 128, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
format(var, 128, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
format(var, 128, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 128, "VirWorld=%d\n",PlayerInfo[playerid][pVirWorld]);fwrite(hFile, var);
format(var, 128, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
format(var, 128, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
format(var, 128, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 128, "FishTool=%d\n",PlayerInfo[playerid][pFishTool]);fwrite(hFile, var);
                format(var, 128, "WhyLeft=%s\n",PlayerInfo[playerid][pWhyLeft]);fwrite(hFile, var);
format(var, 128, "Note1=%s\n",PlayerInfo[playerid][pNote1]);fwrite(hFile, var);
format(var, 128, "Note1s=%d\n",PlayerInfo[playerid][pNote1s]);fwrite(hFile, var);
format(var, 128, "Note2=%s\n",PlayerInfo[playerid][pNote2]);fwrite(hFile, var);
format(var, 128, "Note2s=%d\n",PlayerInfo[playerid][pNote2s]);fwrite(hFile, var);
format(var, 128, "Note3=%s\n",PlayerInfo[playerid][pNote3]);fwrite(hFile, var);
format(var, 128, "Note3s=%d\n",PlayerInfo[playerid][pNote3s]);fwrite(hFile, var);
format(var, 128, "Note4=%s\n",PlayerInfo[playerid][pNote4]);fwrite(hFile, var);
format(var, 128, "Note4s=%d\n",PlayerInfo[playerid][pNote4s]);fwrite(hFile, var);
format(var, 128, "Note5=%s\n",PlayerInfo[playerid][pNote5]);fwrite(hFile, var);
format(var, 128, "Note5s=%d\n",PlayerInfo[playerid][pNote5s]);fwrite(hFile, var);
format(var, 128, "InvWeapon=%d\n",PlayerInfo[playerid][pInvWeapon]);fwrite(hFile, var);
format(var, 128, "InvAmmo=%d\n",PlayerInfo[playerid][pInvAmmo]);fwrite(hFile, var);
format(var, 128, "InvWeapon2=%d\n",PlayerInfo[playerid][pInvWeapon2]);fwrite(hFile, var);
format(var, 128, "InvAmmo2=%d\n",PlayerInfo[playerid][pInvAmmo2]);fwrite(hFile, var);
format(var, 128, "InvWeapon3=%d\n",PlayerInfo[playerid][pInvWeapon3]);fwrite(hFile, var);
format(var, 128, "InvAmmo3=%d\n",PlayerInfo[playerid][pInvAmmo3]);fwrite(hFile, var);
format(var, 128, "InvWeapon4=%d\n",PlayerInfo[playerid][pInvWeapon4]);fwrite(hFile, var);
format(var, 128, "InvAmmo4=%d\n",PlayerInfo[playerid][pInvAmmo4]);fwrite(hFile, var);
format(var, 128, "InvWeapon5=%d\n",PlayerInfo[playerid][pInvWeapon5]);fwrite(hFile, var);
format(var, 128, "InvAmmo5=%d\n",PlayerInfo[playerid][pInvAmmo5]);fwrite(hFile, var);
format(var, 128, "InvWeapon6=%d\n",PlayerInfo[playerid][pInvWeapon6]);fwrite(hFile, var);
format(var, 128, "InvAmmo6=%d\n",PlayerInfo[playerid][pInvAmmo6]);fwrite(hFile, var);
format(var, 128, "Lighter=%d\n",PlayerInfo[playerid][pLighter]);fwrite(hFile, var);
format(var, 128, "Cigarettes=%d\n",PlayerInfo[playerid][pCigarettes]);fwrite(hFile, var);
format(var, 128, "DDManager=%d\n",PlayerInfo[playerid][pDM]);fwrite(hFile, var);
format(var, 128, "OnDuty=%d\n",PlayerInfo[playerid][pDuty]);fwrite(hFile, var);
format(var, 128, "Warnings=%d\n",PlayerInfo[playerid][pWarned]);fwrite(hFile, var);
format(var, 128, "Swat=%d\n",PlayerInfo[playerid][pSwat]);fwrite(hFile, var);
                format(var, 128, "Fighting=%d\n",PlayerInfo[playerid][pFS]);fwrite(hFile, var);
                format(var, 128, "Boxing=%d\n",PlayerInfo[playerid][pBoxiSkill]);fwrite(hFile, var);
                format(var, 128, "KneeHead=%d\n",PlayerInfo[playerid][pKneeSkill]);fwrite(hFile, var);
                format(var, 128, "KungFu=%d\n",PlayerInfo[playerid][pKungSkill]);fwrite(hFile, var);
                format(var, 128, "GrabKick=%d\n",PlayerInfo[playerid][pGrabSkill]);fwrite(hFile, var);
                format(var, 128, "Elbow=%d\n",PlayerInfo[playerid][pElbowSkill]);fwrite(hFile, var);
format(var, 128, "Tactical=%d\n",PlayerInfo[playerid][pTactical]);fwrite(hFile, var);
format(var, 128, "SpecialF=%d\n",PlayerInfo[playerid][pSpecialF]);fwrite(hFile, var);
    format(var, 128, "DutyBanned=%d\n",PlayerInfo[playerid][pDBanned]);fwrite(hFile, var);
    format(var, 128, "DDTicket=%d\n",PlayerInfo[playerid][pDTK]);fwrite(hFile, var);
    format(var, 128, "DDSTicket=%d\n",PlayerInfo[playerid][pDSTK]);fwrite(hFile, var);
    format(var, 128, "Speedo=%d\n",PlayerInfo[playerid][pSpeedo]);fwrite(hFile, var);
format(var, 128, "HydraDriver=%d\n",PlayerInfo[playerid][pHydraR]);fwrite(hFile, var);
    format(var, 128, "HunterDriver=%d\n",PlayerInfo[playerid][pHunterR]);fwrite(hFile, var);
                format(var, 128, "RhinoDriver=%d\n",PlayerInfo[playerid][pRhinoR]);fwrite(hFile, var);
                format(var, 128, "PredatorDriver=%d\n",PlayerInfo[playerid][pPredR]);fwrite(hFile, var);
                format(var, 128, "ViewPms=%d\n",PlayerInfo[playerid][pViewPms]);fwrite(hFile, var);
                format(var, 128, "AppearList=%d\n",PlayerInfo[playerid][pAppearList]);fwrite(hFile, var);
format(var, 128, "AmmunationTime=%d\n",PlayerInfo[playerid][pAmmuTrainTime]);fwrite(hFile, var);
                format(var, 128, "PistolSkill=%d\n",PlayerInfo[playerid][pPistSkill]);fwrite(hFile, var);
                format(var, 128, "SilencedSkill=%d\n",PlayerInfo[playerid][pSilenSkill]);fwrite(hFile, var);
                format(var, 128, "DesertSkill=%d\n",PlayerInfo[playerid][pDesertSkill]);fwrite(hFile, var);
                format(var, 128, "ShotgunSkill=%d\n",PlayerInfo[playerid][pShotgSkill]);fwrite(hFile, var);
                format(var, 128, "SawnoffSkill=%d\n",PlayerInfo[playerid][pSawnSkill]);fwrite(hFile, var);
                format(var, 128, "CombatSkill=%d\n",PlayerInfo[playerid][pCombSkill]);fwrite(hFile, var);
                format(var, 128, "UziSkill=%d\n",PlayerInfo[playerid][pUziSkill]);fwrite(hFile, var);
                format(var, 128, "SMGSkill=%d\n",PlayerInfo[playerid][pSmgSkill]);fwrite(hFile, var);
                format(var, 128, "AK47Skill=%d\n",PlayerInfo[playerid][pAkSkill]);fwrite(hFile, var);
                format(var, 128, "M4Skill=%d\n",PlayerInfo[playerid][pM4Skill]);fwrite(hFile, var);
                format(var, 128, "SniperSkill=%d\n",PlayerInfo[playerid][pSnipSkill]);fwrite(hFile, var);
                format(var, 128, "TutorialDone=%d\n",PlayerInfo[playerid][pTutDone]);fwrite(hFile, var);
                format(var, 128, "RegularCount=%d\n",PlayerInfo[playerid][pRegularCount]);fwrite(hFile, var);
                format(var, 128, "PassportTime=%d\n",PlayerInfo[playerid][pPassportTime]);fwrite(hFile, var);
                format(var, 128, "OfficerTime=%d\n",PlayerInfo[playerid][pOfficerTime]);fwrite(hFile, var);
                format(var, 128, "Achievement0=%d\n",PlayerInfo[playerid][pAchievement0]);fwrite(hFile, var);
                format(var, 128, "Achievement1=%d\n",PlayerInfo[playerid][pAchievement1]);fwrite(hFile, var);
                format(var, 128, "Achievement2=%d\n",PlayerInfo[playerid][pAchievement2]);fwrite(hFile, var);
                format(var, 128, "Achievement3=%d\n",PlayerInfo[playerid][pAchievement3]);fwrite(hFile, var);
                format(var, 128, "Achievement4=%d\n",PlayerInfo[playerid][pAchievement4]);fwrite(hFile, var);
                format(var, 128, "Achievement5=%d\n",PlayerInfo[playerid][pAchievement5]);fwrite(hFile, var);
                format(var, 128, "Achievement6=%d\n",PlayerInfo[playerid][pAchievement6]);fwrite(hFile, var);
                format(var, 128, "Achievement7=%d\n",PlayerInfo[playerid][pAchievement7]);fwrite(hFile, var);
                format(var, 128, "Achievement8=%d\n",PlayerInfo[playerid][pAchievement8]);fwrite(hFile, var);
                format(var, 128, "Achievement9=%d\n",PlayerInfo[playerid][pAchievement9]);fwrite(hFile, var);
                format(var, 128, "Achievement10=%d\n",PlayerInfo[playerid][pAchievement10]);fwrite(hFile, var);
                format(var, 128, "Achievement11=%d\n",PlayerInfo[playerid][pAchievement11]);fwrite(hFile, var);
                format(var, 128, "Achievement12=%d\n",PlayerInfo[playerid][pAchievement12]);fwrite(hFile, var);
                format(var, 128, "Achievement13=%d\n",PlayerInfo[playerid][pAchievement13]);fwrite(hFile, var);
                format(var, 128, "Achievement14=%d\n",PlayerInfo[playerid][pAchievement14]);fwrite(hFile, var);
                format(var, 128, "Achievement15=%d\n",PlayerInfo[playerid][pAchievement15]);fwrite(hFile, var);
                format(var, 128, "Achievement16=%d\n",PlayerInfo[playerid][pAchievement16]);fwrite(hFile, var);
                format(var, 128, "Achievement17=%d\n",PlayerInfo[playerid][pAchievement17]);fwrite(hFile, var);
                format(var, 128, "Achievement18=%d\n",PlayerInfo[playerid][pAchievement18]);fwrite(hFile, var);
                format(var, 128, "Achievement19=%d\n",PlayerInfo[playerid][pAchievement19]);fwrite(hFile, var);
                format(var, 128, "Achievement20=%d\n",PlayerInfo[playerid][pAchievement20]);fwrite(hFile, var);
                format(var, 128, "ShiftName=%d\n",PlayerInfo[playerid][pShiftName]);fwrite(hFile, var);
                format(var, 128, "Weapon=%d\n",PlayerInfo[playerid][pWeapon]);fwrite(hFile, var);
format(var, 128, "Ammo=%d\n",PlayerInfo[playerid][pAmmo]);fwrite(hFile, var);
format(var, 128, "Weapon2=%d\n",PlayerInfo[playerid][pWeapon2]);fwrite(hFile, var);
format(var, 128, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
format(var, 128, "Weapon3=%d\n",PlayerInfo[playerid][pWeapon3]);fwrite(hFile, var);
format(var, 128, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
format(var, 128, "Weapon4=%d\n",PlayerInfo[playerid][pWeapon4]);fwrite(hFile, var);
format(var, 128, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
format(var, 128, "Weapon5=%d\n",PlayerInfo[playerid][pWeapon5]);fwrite(hFile, var);
format(var, 128, "Ammo5=%d\n",PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
format(var, 128, "Weapon6=%d\n",PlayerInfo[playerid][pWeapon6]);fwrite(hFile, var);
format(var, 128, "Ammo6=%d\n",PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
format(var, 128, "Weapon7=%d\n",PlayerInfo[playerid][pWeapon7]);fwrite(hFile, var);
format(var, 128, "Ammo7=%d\n",PlayerInfo[playerid][pAmmo7]);fwrite(hFile, var);
format(var, 128, "Weapon8=%d\n",PlayerInfo[playerid][pWeapon8]);fwrite(hFile, var);
format(var, 128, "Ammo8=%d\n",PlayerInfo[playerid][pAmmo8]);fwrite(hFile, var);
format(var, 128, "Weapon9=%d\n",PlayerInfo[playerid][pWeapon9]);fwrite(hFile, var);
format(var, 128, "Ammo9=%d\n",PlayerInfo[playerid][pAmmo9]);fwrite(hFile, var);
format(var, 128, "Weapon10=%d\n",PlayerInfo[playerid][pWeapon10]);fwrite(hFile, var);
format(var, 128, "Ammo10=%d\n",PlayerInfo[playerid][pAmmo10]);fwrite(hFile, var);
format(var, 128, "Weapon11=%d\n",PlayerInfo[playerid][pWeapon11]);fwrite(hFile, var);
format(var, 128, "Ammo11=%d\n",PlayerInfo[playerid][pAmmo11]);fwrite(hFile, var);
format(var, 128, "Weapon12=%d\n",PlayerInfo[playerid][pWeapon12]);fwrite(hFile, var);
format(var, 128, "Ammo12=%d\n",PlayerInfo[playerid][pAmmo12]);fwrite(hFile, var);
                format(var, 128, "Atc=%d\n",PlayerInfo[playerid][pAtc]);fwrite(hFile, var);
format(var, 128, "AtcRadio=%d\n",PlayerInfo[playerid][pAtcRadio]);fwrite(hFile, var);
                format(var, 128, "Pending=%d\n",PlayerInfo[playerid][pPending]);fwrite(hFile, var);
                format(var, 128, "PendingInfo=%s\n",PlayerInfo[playerid][pPendingInfo]);fwrite(hFile, var);
format(var, 128, "ChatMode=%d\n",PlayerInfo[playerid][pChatMode]);fwrite(hFile, var);
                format(var, 176, "Punishment1=%s\n",PlayerInfo[playerid][pPunishment1]);fwrite(hFile, var);
format(var, 176, "Punishment2=%s\n",PlayerInfo[playerid][pPunishment2]);fwrite(hFile, var);
format(var, 176, "Punishment3=%s\n",PlayerInfo[playerid][pPunishment3]);fwrite(hFile, var);
format(var, 176, "Punishment4=%s\n",PlayerInfo[playerid][pPunishment4]);fwrite(hFile, var);
format(var, 176, "Punishment5=%s\n",PlayerInfo[playerid][pPunishment5]);fwrite(hFile, var);
                format(var, 176, "Punishment6=%s\n",PlayerInfo[playerid][pPunishment6]);fwrite(hFile, var);
format(var, 176, "Punishment7=%s\n",PlayerInfo[playerid][pPunishment7]);fwrite(hFile, var);
format(var, 176, "Punishment8=%s\n",PlayerInfo[playerid][pPunishment8]);fwrite(hFile, var);
format(var, 176, "NextPunishment=%d\n",PlayerInfo[playerid][pNextPunishment]);fwrite(hFile, var);
                format(var, 176, "PunishedTimes=%d\n",PlayerInfo[playerid][pPunished]);fwrite(hFile, var);
                format(var, 176, "TazerBullets=%d\n",PlayerInfo[playerid][pTazerBullets]);fwrite(hFile, var);
                format(var, 176, "IP=%s\n",PlayerInfo[playerid][pIP]);fwrite(hFile, var);
format(var, 176, "LastSeen=%s\n",PlayerInfo[playerid][pLastSeen]);fwrite(hFile, var);
format(var, 176, "RegistredDate=%s\n",PlayerInfo[playerid][pRegistredDate]);fwrite(hFile, var);
format(var, 176, "Changed=%d\n",PlayerInfo[playerid][pChanged]);fwrite(hFile, var);
fclose(hFile);
new loginstring[700],loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname));
              format(loginstring,sizeof(loginstring),"{00C0FF}%s {FFFFFF}dobrodosao na {00C0FF}Old City Roleplay server\n\n {FFFFFF}Vas korisnici racun {00C0FF}je pronaden\n{FFFFFF}Molim {00C0FF}logiraj se\n\n{F3FF02}_______________________\n\n{00C0FF}%s {FFFFFF}welcome to {00C0FF}Old City Roleplay server\n\n{FFFFFF}Your account {00C0FF}was found\n{FFFFFF}Please {00C0FF}login!",loginname,loginname);
            ShowPlayerDialog(playerid,1245,DIALOG_STYLE_PASSWORD,"{00C0FF} Logiranje",loginstring,"Logiranje","Odustani");
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has registred in under IP %s.",d,m,y,h,mi,s,playername3,playersip);
LoginLog(string);
}
}
return 1;
}

Slacu jedno po jedno jer prevazilazi maksimalan broj znakova...

public OnPlayerLogin(playerid,password[])
{
new tmp2[256];
    new string2[64];
    new string[128];
    new playersip[24];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    GetPlayerIp(playerid, playersip, sizeof(playersip));
split(playername2, playernamesplit, '_');
format(string2, sizeof(string2), "LARP/Users/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
    new PassData[256];
    new keytmp[256], valtmp[256];
    fread( UserFile , PassData , sizeof( PassData ) );
    keytmp = ini_GetKey( PassData );
    if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
                    if( strcmp( key , "Spawn" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpawn] = strval( val ); }
if( strcmp( key , "GameSageLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGameSage] = strval( val ); }
                    if( strcmp( key , "HelperLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
        if( strcmp( key , "RegularRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRegularRank] = strval( val ); }
        if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
        if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectSeconds] = strval( val ); }
        if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
        if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
        if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
if( strcmp( key , "GPS" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGPS] = strval( val ); }
if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
        if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); }
        if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
                    if( strcmp( key , "Blind" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBlind] = strval( val ); }
                    if( strcmp( key , "Frozen" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFrozen] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
        if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
        if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
        if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
                    if( strcmp( key , "CrimeReason" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pCrimeReason], val, 0, strlen(val)-1, 255); }
                    if( strcmp( key , "Wanted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWanted] = strval( val ); }
                    if( strcmp( key , "WantedLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedLevel] = strval( val ); }
        if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
        if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
                    if( strcmp( key , "WhyLeft" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWhyLeft] = strval( val ); }
if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
        if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = strval( val ); }
        if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
        if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
        if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); }
        if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBiggestFish] = strval( val ); }
        if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
        if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
        if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); }
        if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
        if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
                    if( strcmp( key , "CanRobTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRobTime] = strval( val ); }
if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
        if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
        if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
        if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
        if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
        if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
        if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
        if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); }
        if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
        if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
        if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
        if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
        if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
        if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
        if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
        if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
        if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
        if( strcmp( key , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCookSkill] = strval( val ); }
        if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
        if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
        if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
                    if( strcmp( key , "pArmour" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmour] = floatstr( val ); }
if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
                    if( strcmp( key , "InteriorNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInteriorNr] = strval( val ); }
if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
        if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
        if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
        if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
        if( strcmp( key , "Car" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey] = strval( val ); }
        if( strcmp( key , "Car2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey2] = strval( val ); }
        if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
        if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
        if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
        if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
        if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
                    if( strcmp( key , "Passport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPassport] = strval( val ); }
if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
                    if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
        if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
        if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
        if( strcmp( key , "CopLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCopLic] = strval( val ); }
        if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
        if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
        if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
        if( strcmp( key , "Watch" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWatch] = strval( val ); }
if( strcmp( key , "Crashed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrashed] = strval( val ); }
        if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); }
        if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); }
        if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); }
        if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); }
        if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); }
        if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); }
        if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); }
        if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
        if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
        if( strcmp( key , "VirWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVirWorld] = strval( val ); }
        if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = strval( val ); }
        if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
        if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "FishTool" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishTool] = strval( val ); }
                    if( strcmp( key , "WhyLeft" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pWhyLeft], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note1s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote1s] = strval( val ); }
        if( strcmp( key , "Note2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote2], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Note2s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote2s] = strval( val ); }
        if( strcmp( key , "Note3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote3], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Note3s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote3s] = strval( val ); }
        if( strcmp( key , "Note4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote4], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Note4s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote4s] = strval( val ); }
        if( strcmp( key , "Note5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote5], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Note5s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote5s] = strval( val ); }
if( strcmp( key , "InvWeapon" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvWeapon] = strval( val ); }
        if( strcmp( key , "InvAmmo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvAmmo] = strval( val ); }
                    if( strcmp( key , "InvWeapon2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvWeapon2] = strval( val ); }
        if( strcmp( key , "InvAmmo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvAmmo2] = strval( val ); }
                    if( strcmp( key , "InvWeapon3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvWeapon3] = strval( val ); }
        if( strcmp( key , "InvAmmo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvAmmo3] = strval( val ); }
        if( strcmp( key , "InvWeapon4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvWeapon4] = strval( val ); }
        if( strcmp( key , "InvAmmo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvAmmo4] = strval( val ); }
        if( strcmp( key , "InvWeapon5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvWeapon5] = strval( val ); }
        if( strcmp( key , "InvAmmo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvAmmo5] = strval( val ); }
        if( strcmp( key , "InvWeapon6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvWeapon6] = strval( val ); }
        if( strcmp( key , "InvAmmo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInvAmmo6] = strval( val ); }
        if( strcmp( key , "Lighter" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLighter] = strval( val ); }
        if( strcmp( key , "Cigarettes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCigarettes] = strval( val ); }
        if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarned] = strval( val ); }
        if( strcmp( key , "Swat" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSwat] = strval( val ); }
        if( strcmp( key , "Tactical" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTactical] = strval( val ); }
        if( strcmp( key , "SpecialF" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpecialF] = strval( val ); }
        if( strcmp( key , "DutyBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDBanned] = strval( val ); }
        if( strcmp( key , "OnDuty" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDuty] = strval( val ); }
                    if( strcmp( key , "DDManager" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDM] = strval( val ); }
                    if( strcmp( key , "DDTicket" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDTK] = strval( val ); }
                    if( strcmp( key , "DDSTicket" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDSTK] = strval( val ); }
                    if( strcmp( key , "Fighting" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFS] = strval( val ); }
                    if( strcmp( key , "Boxing" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxiSkill] = strval( val ); }
                    if( strcmp( key , "KneeHead" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKneeSkill] = strval( val ); }
                    if( strcmp( key , "KungFu" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKungSkill] = strval( val ); }
                    if( strcmp( key , "GrabKick" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGrabSkill] = strval( val ); }
                    if( strcmp( key , "Elbow" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pElbowSkill] = strval( val ); }
                    if( strcmp( key , "CDPlayer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCD] = strval( val ); }
if( strcmp( key , "Speedo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpeedo] = strval( val ); }
if( strcmp( key , "Helper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
                    if( strcmp( key , "GameSage" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGameSage] = strval( val ); }
if( strcmp( key , "HydraDriver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHydraR] = strval( val ); }
if( strcmp( key , "HunterDriver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHunterR] = strval( val ); }
if( strcmp( key , "RhinoDriver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRhinoR] = strval( val ); }
if( strcmp( key , "PredatorDriver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPredR] = strval( val ); }
                    if( strcmp( key , "ViewPms" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pViewPms] = strval( val ); }
                    if( strcmp( key , "AppearList" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAppearList] = strval( val ); }
if( strcmp( key , "AmmunationTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmuTrainTime] = strval( val ); }
if( strcmp( key , "PistolSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPistSkill] = strval( val ); }
if( strcmp( key , "SilencedSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSilenSkill] = strval( val ); }
if( strcmp( key , "DesertSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDesertSkill] = strval( val ); }
if( strcmp( key , "ShotgunSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pShotgSkill] = strval( val ); }
if( strcmp( key , "SawnoffSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSawnSkill] = strval( val ); }
if( strcmp( key , "CombatSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCombSkill] = strval( val ); }
if( strcmp( key , "UziSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUziSkill] = strval( val ); }
if( strcmp( key , "SmgSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSmgSkill] = strval( val ); }
if( strcmp( key , "Ak47Skill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAkSkill] = strval( val ); }
if( strcmp( key , "M4Skill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pM4Skill] = strval( val ); }
                    if( strcmp( key , "TutorialDone" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTutDone] = strval( val ); }
                    if( strcmp( key , "RegularCount" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRegularCount] = strval( val ); }
                    if( strcmp( key , "PassportTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPassportTime] = strval( val ); }
                    if( strcmp( key , "OfficerTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOfficerTime] = strval( val ); }
if( strcmp( key , "Achievement0" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement0] = strval( val ); }
                    if( strcmp( key , "Achievement1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement1] = strval( val ); }
                    if( strcmp( key , "Achievement2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement2] = strval( val ); }
                    if( strcmp( key , "Achievement3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement3] = strval( val ); }
                    if( strcmp( key , "Achievement4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement4] = strval( val ); }
                    if( strcmp( key , "Achievement5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement5] = strval( val ); }
                    if( strcmp( key , "Achievement6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement6] = strval( val ); }
                    if( strcmp( key , "Achievement7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement7] = strval( val ); }
                    if( strcmp( key , "Achievement8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement8] = strval( val ); }
                    if( strcmp( key , "Achievement9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement9] = strval( val ); }
                    if( strcmp( key , "Achievement10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement10] = strval( val ); }
                    if( strcmp( key , "Achievement11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement11] = strval( val ); }
                    if( strcmp( key , "Achievement12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement12] = strval( val ); }
                    if( strcmp( key , "Achievement13" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement13] = strval( val ); }
                    if( strcmp( key , "Achievement14" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement14] = strval( val ); }
                    if( strcmp( key , "Achievement15" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement15] = strval( val ); }
                    if( strcmp( key , "Achievement16" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement16] = strval( val ); }
                    if( strcmp( key , "Achievement17" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement17] = strval( val ); }
                    if( strcmp( key , "Achievement18" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement18] = strval( val ); }
                    if( strcmp( key , "Achievement19" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement19] = strval( val ); }
                    if( strcmp( key , "Achievement20" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAchievement20] = strval( val ); }
                    if( strcmp( key , "ShiftName" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pShiftName] = strval( val ); }
                    if( strcmp( key , "Weapon" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon] = strval( val ); }
        if( strcmp( key , "Ammo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo] = strval( val ); }
                    if( strcmp( key , "Weapon2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon2] = strval( val ); }
        if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
                    if( strcmp( key , "Weapon3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon3] = strval( val ); }
        if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
        if( strcmp( key , "Weapon4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon4] = strval( val ); }
        if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
        if( strcmp( key , "Weapon5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon5] = strval( val ); }
        if( strcmp( key , "Ammo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo5] = strval( val ); }
        if( strcmp( key , "Weapon6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon6] = strval( val ); }
        if( strcmp( key , "Ammo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo6] = strval( val ); }
        if( strcmp( key , "Weapon7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon7] = strval( val ); }
        if( strcmp( key , "Ammo7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo7] = strval( val ); }
        if( strcmp( key , "Weapon8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon8] = strval( val ); }
        if( strcmp( key , "Ammo8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo8] = strval( val ); }
        if( strcmp( key , "Weapon9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon9] = strval( val ); }
        if( strcmp( key , "Ammo9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo9] = strval( val ); }
        if( strcmp( key , "Weapon10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon10] = strval( val ); }
        if( strcmp( key , "Ammo10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo10] = strval( val ); }
        if( strcmp( key , "Weapon11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon11] = strval( val ); }
        if( strcmp( key , "Ammo11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo11] = strval( val ); }
        if( strcmp( key , "Weapon12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon12] = strval( val ); }
        if( strcmp( key , "Ammo12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo12] = strval( val ); }
                    if( strcmp( key , "Atc" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAtc] = strval( val ); }
        if( strcmp( key , "AtcRadio" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAtcRadio] = strval( val ); }
        if( strcmp( key , "Pending" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPending] = strval( val ); }
        if( strcmp( key , "PendingInfo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPendingInfo], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "ChatMode" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChatMode] = strval( val ); }
                    if( strcmp( key , "Punishment1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment1], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Punishment2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment2], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Punishment3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment3], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Punishment4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment4], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Punishment5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment5], val, 0, strlen(val)-1, 255); }
                    if( strcmp( key , "Punishment6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment6], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Punishment7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment7], val, 0, strlen(val)-1, 255); }
        if( strcmp( key , "Punishment8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPunishment8], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "NextPunishment" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNextPunishment] = strval( val ); }
                    if( strcmp( key , "Punished" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPunished] = strval( val ); }
                    if( strcmp( key , "TazerBullets" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTazerBullets] = strval( val ); }
                    if( strcmp( key , "Changed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChanged] = strval( val ); }
                    if( strcmp( key , "IP" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pIP], val, 0, strlen(val)-1, 255); }
                    if( strcmp( key , "LastSeen" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pLastSeen], val, 0, strlen(val)-1, 255); }
                    if( strcmp( key , "RegistredDate" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pRegistredDate], val, 0, strlen(val)-1, 255); }
}//end while
                fclose(UserFile);//close the file after everything has been read in the while
}
else
{
        fclose(UserFile);
        gPlayerLogTries[playerid] += 1;
        ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Pokusajte ponovno, Molimo vas da se Logirate","Unijeli ste pogresan password\nUpisite svoj password iznad kako bi se Logirali","Log-in","Quit");
        if(gPlayerLogTries[playerid] == 3) { Kick(playerid); }
        return 1;
}
RingTone[playerid] = 20;
TextDrawShowForPlayer(playerid, Textdraw44);
TextDrawShowForPlayer(playerid, Textdraw45);
TextDrawShowForPlayer(playerid, Textdraw49[playerid]);
TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
//TextDrawShowForPlayer(playerid, Textdraw53[playerid]);
TextDrawShowForPlayer(playerid, Textdraw55);
// novi text
TextDrawShowForPlayer(playerid, Textdraw59);
// TextDrawShowForPlayer(playerid, Textdraw60);
// TextDrawShowForPlayer(playerid, Textdraw61);
//        TextDrawShowForPlayer(playerid, Textdraw62);
if(PlayerInfo[playerid][pWatch] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw56);
TextDrawShowForPlayer(playerid, Textdraw57);
TextDrawShowForPlayer(playerid, Textdraw58);
}
if(CountdownRunning == 1)
{
    TextDrawShowForPlayer(playerid, Textdraw46);
}
if(PlayerInfo[playerid][pChanged] == 1)
{
    SendClientMessage(playerid, COLOR_NICERED,"* Ovo ime je izbrisano, kontaktirajte admine da promijne misljenje!");
    return 1;
}
// ispravka spawn odnma daje stats

if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pArmour] = 0.0;
PlayerInfo[playerid][pPassportTime] = 18000;
PlayerInfo[playerid][pRegularCount] = 144000;
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pModel] = 135;
new randphone = 100000 + random(899999);//minimum 1000  max 9999 //giving one at the start
PlayerInfo[playerid][pPnumber] = randphone;
PlayerInfo[playerid][pPhousekey] = 999;
PlayerInfo[playerid][pPcarkey] = 999;
PlayerInfo[playerid][pPcarkey2] = 999;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pReg] = 1;
SafeGivePlayerMoney(playerid, 2000);
new d,m,y;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string),  "%d/%d/%d at %d:%d:%d",d,m,y,h,mi,s);
strmid(PlayerInfo[playerid][pRegistredDate], string, 0, strlen(string), 255);
}
SetPlayerSkills(playerid);
if(PlayerInfo[playerid][pPending] == 1)
{
    format(string, sizeof(string), "[INFO]: %s se logirao sa banom, poduzmite nesto u vezi njega!!",playername2);
    SendAdminMessage(COLOR_GREEN, string);
}
else if(PlayerInfo[playerid][pCK] > 0)
{
    Kick(playerid);
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
admins ++;
}
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SafeSetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
SafeResetPlayerMoney(playerid);
SafeGivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
ClearChatbox(playerid, 8);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "=======================================================================");
  format(string2, sizeof(string2), "Dobrodosao na Old City  Server, %s.",playername2);
SendClientMessage(playerid, COLOR_WHITE,string2);
format(string2, sizeof(string2), "",Version);
SendClientMessage(playerid, COLOR_YELLOW, string2);
strmid(PlayerInfo[playerid][pIP], playersip, 0, strlen(playersip), 255);
if (PlayerInfo[playerid][pRegularRank] > 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Dobrodosao na Old City !");
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "SERVER: Logirao si se kao Admin Level: %d .",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE,string2);
}
SendClientMessage(playerid, COLOR_LIGHTBLUE, "=======================================================================");
SendClientMessage(playerid, COLOR_WHITE, " ");
// Reset the FirstSpawn variable
SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
// Unset Crash
SetTimerEx("UnsetCrash", 5000, false, "i", playerid);
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
if(gTeam[playerid] == 0)
{
gTeam[playerid] = 3;
}
else
{
gTeam[playerid] = PlayerInfo[playerid][pTeam];
}
gPlayerLogged[playerid] = 1;

SpawnWorld[playerid] = GetPlayerVirtualWorld(playerid);
SpawnInterior[playerid] = PlayerInfo[playerid][pInt];

SpawnPlayer(playerid);

    PlayerInfo[playerid][pAppearList] = 1;  // ispisuje admina na listi [login]

SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
// ispis logina
/*format(string, sizeof(string), "[OC:RP]: %s id(%d) se pridruzio serveru !", playername2, playerid);
SendAdminMessage(ZELENKASTA, string); */

if(PlayerInfo[playerid][pBlind] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw5);
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Ti si bio zaslijepljen od jednog od Admina, kad si zadnji puta igrao; Koristi /report ako trebas pomoc od Admin-a.");
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Ti si bio usutkan od jednog od Admina, kad si zadnji puta igrao; Koristi /report ako trebas pomoc od Admin-a.");
}
if(PlayerInfo[playerid][pJailed] == 1)
{
format(string, sizeof(string), "Zatvoren si na %d sekunda; Koristi /report ako trebas pomoc od Admina.", PlayerInfo[playerid][pJailTime]);
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
}
if(PlayerInfo[playerid][pCrashed] == 0)
{
format(tmp2, sizeof(tmp2), "~w~Dobrodosao ~n~~y~   %s", playername2);
}
DateProp(playerid);
GameTextForPlayer(playerid, tmp2, 5000, 1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, textmotd);
if(PlayerInfo[playerid][pFMember] < 255)
{
    format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
    SendClientMessage(playerid, COLOR_YELLOW, tmp2);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(PlayerInfo[i][pMaskuse] == 1)
        {
            ShowPlayerNameTagForPlayer(playerid, i, 0);
        }
    }
}
if(!strcmp(playername2, "<changeme>", true)) // If your nickname is John_Sheppard, change the <changeme> to John_Sheppard, this will give you immunity.
{
    Untouchable[playerid] = 1;
  }
  if(!strcmp(playername2, "Robby", true))
{
    Untouchable[playerid] = 1;
  }
  if(First == 0)
  {
  if(PlayerInfo[playerid][pAdmin] >= 6)
  {
      new message[] = "Dobrodosli; Skripta je saznala da bi ovo mogao biti prvi put da ste upalili server. \n\n\n Ja sam Faris, i naucit cu vas nekim stvarima koje morate promijeniti(PROMIJENJENO). \n\n\n Pritisnite \"Proceed\"kako bi dosli na tutorial";
ShowPlayerDialog(playerid, 1250, DIALOG_STYLE_MSGBOX, "Dobrodosli.......",message,"Proceed","Cancel");
}
}
if(PlayerInfo[playerid][pWanted] == 1)
{
    SetPlayerColor(playerid, 0xFF990000);
WantedPoints[playerid] = PlayerInfo[playerid][pWantedLevel];
    SetPlayerCriminal(playerid, 255, PlayerInfo[playerid][pCrimeReason]);
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has logged in under IP %s.",d,m,y,h,mi,s,playername2,playersip);
LoginLog(string);
// dodati bezanje sa servera !!!
if(PlayerInfo[playerid][pFrozen] == 1) // za bezanje
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Bjezanje sa servera !!! , razmisli drugi put sta ces uciniti .");

SafeResetPlayerWeapons(playerid);
WantedPoints[playerid] = 0;
SetPlayerColor(playerid, TEAM_HIT_COLOR);
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = 420;
SafeSetPlayerInterior(playerid, 6);
SafeSetPlayerPos(playerid, 264.6288,77.5742,1001.0391);
SetPlayerSkin(playerid, 252);
SendClientMessage(playerid, COLOR_YELLOW,"Zatvoren si na 7 minuta zbog bezanja sa servera !!!");
PlayerInfo[playerid][pDuty] = 0;
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
}

//===============================
}
return 1;
}

public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
new string3[64];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "LARP/Users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[176];
format(var, 128, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 128, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
                format(var, 128, "Spawn=%d\n",PlayerInfo[playerid][pSpawn]);fwrite(hFile, var);
format(var, 128, "GameSageLevel=%d\n",PlayerInfo[playerid][pGameSage]);fwrite(hFile, var);
format(var, 128, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
format(var, 128, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 128, "RegularRank=%d\n",PlayerInfo[playerid][pRegularRank]);fwrite(hFile, var);
format(var, 128, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 128, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectSeconds]);fwrite(hFile, var);
format(var, 128, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
format(var, 128, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
format(var, 128, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
                format(var, 128, "GPS=%d\n",PlayerInfo[playerid][pGPS]);fwrite(hFile, var);
format(var, 128, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
format(var, 128, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
format(var, 128, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
                format(var, 128, "Frozen=%d\n",PlayerInfo[playerid][pFrozen]);fwrite(hFile, var);
                format(var, 128, "Blind=%d\n",PlayerInfo[playerid][pBlind]);fwrite(hFile, var);
format(var, 128, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
PlayerInfo[playerid][pCash] = ScriptMoney[playerid];
format(var, 128, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
format(var, 128, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
format(var, 128, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
format(var, 128, "CrimeReason=%s\n",PlayerInfo[playerid][pCrimeReason]);fwrite(hFile, var);
format(var, 128, "Wanted=%d\n",PlayerInfo[playerid][pWanted]);fwrite(hFile, var);
format(var, 128, "WantedLevel=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var);
format(var, 128, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 128, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
                format(var, 128, "WhyLeft=%d\n",PlayerInfo[playerid][pWhyLeft]);fwrite(hFile, var);
format(var, 128, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
format(var, 128, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
format(var, 128, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 128, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
format(var, 128, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
format(var, 128, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
format(var, 128, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
format(var, 128, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
format(var, 128, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
format(var, 128, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
format(var, 128, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
format(var, 128, "CanRobTime=%d\n",PlayerInfo[playerid][pRobTime]);fwrite(hFile, var);
format(var, 128, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
format(var, 128, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
format(var, 128, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
format(var, 128, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
format(var, 128, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
format(var, 128, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
format(var, 128, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
format(var, 128, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
format(var, 128, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
format(var, 128, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
format(var, 128, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
format(var, 128, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
format(var, 128, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
format(var, 128, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
format(var, 128, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
format(var, 128, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
format(var, 128, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
format(var, 128, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
format(var, 128, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
format(var, 128, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
format(var, 128, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
                format(var, 128, "pArmour=%.1f\n",PlayerInfo[playerid][pArmour]);fwrite(hFile, var);
format(var, 128, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
format(var, 128, "InteriorNr=%d\n",PlayerInfo[playerid][pInteriorNr]);fwrite(hFile, var);
format(var, 128, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
format(var, 128, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
format(var, 128, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
format(var, 128, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
format(var, 128, "Car=%d\n",PlayerInfo[playerid][pPcarkey]);fwrite(hFile, var);
                format(var, 128, "Car2=%d\n",PlayerInfo[playerid][pPcarkey2]);fwrite(hFile, var);
format(var, 128, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 128, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
format(var, 128, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
format(var, 128, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
format(var, 128, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
format(var, 128, "Passport=%d\n",PlayerInfo[playerid][pPassport]);fwrite(hFile, var);
format(var, 128, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                format(var, 128, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 128, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 128, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
format(var, 128, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
format(var, 128, "CopLic=%d\n",PlayerInfo[playerid][pCopLic]);fwrite(hFile, var);
format(var, 128, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
format(var, 128, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 128, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
format(var, 128, "Watch=%d\n",PlayerInfo[playerid][pWatch]);fwrite(hFile, var);
format(var, 128, "Crashed=%d\n",PlayerInfo[playerid][pCrashed]);fwrite(hFile, var);
format(var, 128, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
format(var, 128, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
format(var, 128, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
format(var, 128, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
format(var, 128, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
format(var, 128, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
format(var, 128, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
format(var, 128, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 128, "VirWorld=%d\n",PlayerInfo[playerid][pVirWorld]);fwrite(hFile, var);
if(PlayerInfo[playerid][pRegularRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
format(var, 128, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
format(var, 128, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
format(var, 128, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 128, "FishTool=%d\n",PlayerInfo[playerid][pFishTool]);fwrite(hFile, var);
    format(var, 128, "WhyLeft=%s\n",PlayerInfo[playerid][pWhyLeft]);fwrite(hFile, var);
format(var, 128, "Note1=%s\n",PlayerInfo[playerid][pNote1]);fwrite(hFile, var);
format(var, 128, "Note1s=%d\n",PlayerInfo[playerid][pNote1s]);fwrite(hFile, var);
format(var, 128, "Note2=%s\n",PlayerInfo[playerid][pNote2]);fwrite(hFile, var);
format(var, 128, "Note2s=%d\n",PlayerInfo[playerid][pNote2s]);fwrite(hFile, var);
format(var, 128, "Note3=%s\n",PlayerInfo[playerid][pNote3]);fwrite(hFile, var);
format(var, 128, "Note3s=%d\n",PlayerInfo[playerid][pNote3s]);fwrite(hFile, var);
format(var, 128, "Note4=%s\n",PlayerInfo[playerid][pNote4]);fwrite(hFile, var);
format(var, 128, "Note4s=%d\n",PlayerInfo[playerid][pNote4s]);fwrite(hFile, var);
format(var, 128, "Note5=%s\n",PlayerInfo[playerid][pNote5]);fwrite(hFile, var);
format(var, 128, "Note5s=%d\n",PlayerInfo[playerid][pNote5s]);fwrite(hFile, var);
format(var, 128, "InvWeapon=%d\n",PlayerInfo[playerid][pInvWeapon]);fwrite(hFile, var);
format(var, 128, "InvAmmo=%d\n",PlayerInfo[playerid][pInvAmmo]);fwrite(hFile, var);
format(var, 128, "InvWeapon2=%d\n",PlayerInfo[playerid][pInvWeapon2]);fwrite(hFile, var);
format(var, 128, "InvAmmo2=%d\n",PlayerInfo[playerid][pInvAmmo2]);fwrite(hFile, var);
format(var, 128, "InvWeapon3=%d\n",PlayerInfo[playerid][pInvWeapon3]);fwrite(hFile, var);
format(var, 128, "InvAmmo3=%d\n",PlayerInfo[playerid][pInvAmmo3]);fwrite(hFile, var);
format(var, 128, "InvWeapon4=%d\n",PlayerInfo[playerid][pInvWeapon4]);fwrite(hFile, var);
format(var, 128, "InvAmmo4=%d\n",PlayerInfo[playerid][pInvAmmo4]);fwrite(hFile, var);
format(var, 128, "InvWeapon5=%d\n",PlayerInfo[playerid][pInvWeapon5]);fwrite(hFile, var);
format(var, 128, "InvAmmo5=%d\n",PlayerInfo[playerid][pInvAmmo5]);fwrite(hFile, var);
format(var, 128, "InvWeapon6=%d\n",PlayerInfo[playerid][pInvWeapon6]);fwrite(hFile, var);
format(var, 128, "InvAmmo6=%d\n",PlayerInfo[playerid][pInvAmmo6]);fwrite(hFile, var);
format(var, 128, "Lighter=%d\n",PlayerInfo[playerid][pLighter]);fwrite(hFile, var);
format(var, 128, "Cigarettes=%d\n",PlayerInfo[playerid][pCigarettes]);fwrite(hFile, var);
format(var, 128, "Warnings=%d\n",PlayerInfo[playerid][pWarned]);fwrite(hFile, var);
format(var, 128, "Swat=%d\n",PlayerInfo[playerid][pSwat]);fwrite(hFile, var);
                format(var, 128, "Fighting=%d\n",PlayerInfo[playerid][pFS]);fwrite(hFile, var);
                format(var, 128, "Boxing=%d\n",PlayerInfo[playerid][pBoxiSkill]);fwrite(hFile, var);
                format(var, 128, "KneeHead=%d\n",PlayerInfo[playerid][pKneeSkill]);fwrite(hFile, var);
                format(var, 128, "KungFu=%d\n",PlayerInfo[playerid][pKungSkill]);fwrite(hFile, var);
                format(var, 128, "GrabKick=%d\n",PlayerInfo[playerid][pGrabSkill]);fwrite(hFile, var);
                format(var, 128, "Elbow=%d\n",PlayerInfo[playerid][pElbowSkill]);fwrite(hFile, var);
format(var, 128, "Tactical=%d\n",PlayerInfo[playerid][pTactical]);fwrite(hFile, var);
format(var, 128, "SpecialF=%d\n",PlayerInfo[playerid][pSpecialF]);fwrite(hFile, var);
                format(var, 128, "DutyBanned=%d\n",PlayerInfo[playerid][pDBanned]);fwrite(hFile, var);
                format(var, 128, "DDManager=%d\n",PlayerInfo[playerid][pDM]);fwrite(hFile, var);
format(var, 128, "OnDuty=%d\n",PlayerInfo[playerid][pDuty]);fwrite(hFile, var);
    format(var, 128, "DDTicket=%d\n",PlayerInfo[playerid][pDTK]);fwrite(hFile, var);
    format(var, 128, "DDSTicket=%d\n",PlayerInfo[playerid][pDSTK]);fwrite(hFile, var);
    format(var, 128, "CDPlayer=%d\n",PlayerInfo[playerid][pCD]);fwrite(hFile, var);
    format(var, 128, "Speedo=%d\n",PlayerInfo[playerid][pSpeedo]);fwrite(hFile, var);
format(var, 128, "HydraDriver=%d\n",PlayerInfo[playerid][pHydraR]);fwrite(hFile, var);
    format(var, 128, "HunterDriver=%d\n",PlayerInfo[playerid][pHunterR]);fwrite(hFile, var);
    format(var, 128, "RhinoDriver=%d\n",PlayerInfo[playerid][pRhinoR]);fwrite(hFile, var);
    format(var, 128, "PredatorDriver=%d\n",PlayerInfo[playerid][pPredR]);fwrite(hFile, var);
                format(var, 128, "ViewPms=%d\n",PlayerInfo[playerid][pViewPms]);fwrite(hFile, var);
                format(var, 128, "AppearList=%d\n",PlayerInfo[playerid][pAppearList]);fwrite(hFile, var);
format(var, 128, "AmmunationTime=%d\n",PlayerInfo[playerid][pAmmuTrainTime]);fwrite(hFile, var);
        format(var, 128, "PistolSkill=%d\n",PlayerInfo[playerid][pPistSkill]);fwrite(hFile, var);
                format(var, 128, "SilencedSkill=%d\n",PlayerInfo[playerid][pSilenSkill]);fwrite(hFile, var);
                format(var, 128, "DesertSkill=%d\n",PlayerInfo[playerid][pDesertSkill]);fwrite(hFile, var);
                format(var, 128, "ShotgunSkill=%d\n",PlayerInfo[playerid][pShotgSkill]);fwrite(hFile, var);
                format(var, 128, "SawnoffSkill=%d\n",PlayerInfo[playerid][pSawnSkill]);fwrite(hFile, var);
                format(var, 128, "CombatSkill=%d\n",PlayerInfo[playerid][pCombSkill]);fwrite(hFile, var);
                format(var, 128, "UziSkill=%d\n",PlayerInfo[playerid][pUziSkill]);fwrite(hFile, var);
                format(var, 128, "SMGSkill=%d\n",PlayerInfo[playerid][pSmgSkill]);fwrite(hFile, var);
                format(var, 128, "AK47Skill=%d\n",PlayerInfo[playerid][pAkSkill]);fwrite(hFile, var);
                format(var, 128, "M4Skill=%d\n",PlayerInfo[playerid][pM4Skill]);fwrite(hFile, var);
                format(var, 128, "SniperSkill=%d\n",PlayerInfo[playerid][pSnipSkill]);fwrite(hFile, var);
                format(var, 128, "TutorialDone=%d\n",PlayerInfo[playerid][pTutDone]);fwrite(hFile, var);
                format(var, 128, "RegularCount=%d\n",PlayerInfo[playerid][pRegularCount]);fwrite(hFile, var);
                format(var, 128, "PassportTime=%d\n",PlayerInfo[playerid][pPassportTime]);fwrite(hFile, var);
                format(var, 128, "OfficerTime=%d\n",PlayerInfo[playerid][pOfficerTime]);fwrite(hFile, var);format(var, 128, "Achievement0=%d\n",PlayerInfo[playerid][pAchievement0]);fwrite(hFile, var);
                format(var, 128, "Achievement1=%d\n",PlayerInfo[playerid][pAchievement1]);fwrite(hFile, var);
                format(var, 128, "Achievement2=%d\n",PlayerInfo[playerid][pAchievement2]);fwrite(hFile, var);
                format(var, 128, "Achievement3=%d\n",PlayerInfo[playerid][pAchievement3]);fwrite(hFile, var);
                format(var, 128, "Achievement4=%d\n",PlayerInfo[playerid][pAchievement4]);fwrite(hFile, var);
                format(var, 128, "Achievement5=%d\n",PlayerInfo[playerid][pAchievement5]);fwrite(hFile, var);
                format(var, 128, "Achievement6=%d\n",PlayerInfo[playerid][pAchievement6]);fwrite(hFile, var);
                format(var, 128, "Achievement7=%d\n",PlayerInfo[playerid][pAchievement7]);fwrite(hFile, var);
                format(var, 128, "Achievement8=%d\n",PlayerInfo[playerid][pAchievement8]);fwrite(hFile, var);
                format(var, 128, "Achievement9=%d\n",PlayerInfo[playerid][pAchievement9]);fwrite(hFile, var);
                format(var, 128, "Achievement10=%d\n",PlayerInfo[playerid][pAchievement10]);fwrite(hFile, var);
                format(var, 128, "Achievement11=%d\n",PlayerInfo[playerid][pAchievement11]);fwrite(hFile, var);
                format(var, 128, "Achievement12=%d\n",PlayerInfo[playerid][pAchievement12]);fwrite(hFile, var);
                format(var, 128, "Achievement13=%d\n",PlayerInfo[playerid][pAchievement13]);fwrite(hFile, var);
                format(var, 128, "Achievement14=%d\n",PlayerInfo[playerid][pAchievement14]);fwrite(hFile, var);
                format(var, 128, "Achievement15=%d\n",PlayerInfo[playerid][pAchievement15]);fwrite(hFile, var);
                format(var, 128, "Achievement16=%d\n",PlayerInfo[playerid][pAchievement16]);fwrite(hFile, var);
                format(var, 128, "Achievement17=%d\n",PlayerInfo[playerid][pAchievement17]);fwrite(hFile, var);
                format(var, 128, "Achievement18=%d\n",PlayerInfo[playerid][pAchievement18]);fwrite(hFile, var);
                format(var, 128, "Achievement19=%d\n",PlayerInfo[playerid][pAchievement19]);fwrite(hFile, var);
                format(var, 128, "Achievement20=%d\n",PlayerInfo[playerid][pAchievement20]);fwrite(hFile, var);
                format(var, 128, "ShiftName=%d\n",PlayerInfo[playerid][pShiftName]);fwrite(hFile, var);
                format(var, 128, "Weapon=%d\n",PlayerInfo[playerid][pWeapon]);fwrite(hFile, var);
format(var, 128, "Ammo=%d\n",PlayerInfo[playerid][pAmmo]);fwrite(hFile, var);
format(var, 128, "Weapon2=%d\n",PlayerInfo[playerid][pWeapon2]);fwrite(hFile, var);
format(var, 128, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
format(var, 128, "Weapon3=%d\n",PlayerInfo[playerid][pWeapon3]);fwrite(hFile, var);
format(var, 128, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
format(var, 128, "Weapon4=%d\n",PlayerInfo[playerid][pWeapon4]);fwrite(hFile, var);
format(var, 128, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
format(var, 128, "Weapon5=%d\n",PlayerInfo[playerid][pWeapon5]);fwrite(hFile, var);
format(var, 128, "Ammo5=%d\n",PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
format(var, 128, "Weapon6=%d\n",PlayerInfo[playerid][pWeapon6]);fwrite(hFile, var);
format(var, 128, "Ammo6=%d\n",PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
format(var, 128, "Weapon7=%d\n",PlayerInfo[playerid][pWeapon7]);fwrite(hFile, var);
format(var, 128, "Ammo7=%d\n",PlayerInfo[playerid][pAmmo7]);fwrite(hFile, var);
format(var, 128, "Weapon8=%d\n",PlayerInfo[playerid][pWeapon8]);fwrite(hFile, var);
format(var, 128, "Ammo8=%d\n",PlayerInfo[playerid][pAmmo8]);fwrite(hFile, var);
format(var, 128, "Weapon9=%d\n",PlayerInfo[playerid][pWeapon9]);fwrite(hFile, var);
format(var, 128, "Ammo9=%d\n",PlayerInfo[playerid][pAmmo9]);fwrite(hFile, var);
format(var, 128, "Weapon10=%d\n",PlayerInfo[playerid][pWeapon10]);fwrite(hFile, var);
format(var, 128, "Ammo10=%d\n",PlayerInfo[playerid][pAmmo10]);fwrite(hFile, var);
format(var, 128, "Weapon11=%d\n",PlayerInfo[playerid][pWeapon11]);fwrite(hFile, var);
format(var, 128, "Ammo11=%d\n",PlayerInfo[playerid][pAmmo11]);fwrite(hFile, var);
format(var, 128, "Weapon12=%d\n",PlayerInfo[playerid][pWeapon12]);fwrite(hFile, var);
format(var, 128, "Atc=%d\n",PlayerInfo[playerid][pAtc]);fwrite(hFile, var);
format(var, 128, "AtcRadio=%d\n",PlayerInfo[playerid][pAtcRadio]);fwrite(hFile, var);
                format(var, 128, "Pending=%d\n",PlayerInfo[playerid][pPending]);fwrite(hFile, var);
                format(var, 128, "PendingInfo=%s\n",PlayerInfo[playerid][pPendingInfo]);fwrite(hFile, var);
format(var, 128, "ChatMode=%d\n",PlayerInfo[playerid][pChatMode]);fwrite(hFile, var);
                format(var, 176, "Punishment1=%s\n",PlayerInfo[playerid][pPunishment1]);fwrite(hFile, var);
format(var, 176, "Punishment2=%s\n",PlayerInfo[playerid][pPunishment2]);fwrite(hFile, var);
format(var, 176, "Punishment3=%s\n",PlayerInfo[playerid][pPunishment3]);fwrite(hFile, var);
format(var, 176, "Punishment4=%s\n",PlayerInfo[playerid][pPunishment4]);fwrite(hFile, var);
format(var, 176, "Punishment5=%s\n",PlayerInfo[playerid][pPunishment5]);fwrite(hFile, var);
                format(var, 176, "Punishment6=%s\n",PlayerInfo[playerid][pPunishment6]);fwrite(hFile, var);
format(var, 176, "Punishment7=%s\n",PlayerInfo[playerid][pPunishment7]);fwrite(hFile, var);
format(var, 176, "Punishment8=%s\n",PlayerInfo[playerid][pPunishment8]);fwrite(hFile, var);
format(var, 176, "NextPunishment=%d\n",PlayerInfo[playerid][pNextPunishment]);fwrite(hFile, var);
                format(var, 176, "PunishedTimes=%d\n",PlayerInfo[playerid][pPunished]);fwrite(hFile, var);
                format(var, 176, "TazerBullets=%d\n",PlayerInfo[playerid][pTazerBullets]);fwrite(hFile, var);
format(var, 176, "LastSeen=%s\n",PlayerInfo[playerid][pLastSeen]);fwrite(hFile, var);
format(var, 176, "RegistredDate=%s\n",PlayerInfo[playerid][pRegistredDate]);fwrite(hFile, var);
format(var, 176, "Changed=%d\n",PlayerInfo[playerid][pChanged]);fwrite(hFile, var);
fclose(hFile);
}
}
}
return 1;
}

Citat: LordShigi poslato Novembar 21, 2012, 15:27:39 POSLE PODNE
Pa samo pokreni neki timer koji ce funkciju za spremanje pokrenuti svakih X minuta.

http://wiki.sa-mp.com/wiki/SetTimer

Ne lupaj [cenzura]osti, to je najgori moguci nacin sejvanja koj neko moze da ima. Kad bi igracu Crash server, izgubio bi poslednje promene.

@Streetboy, pod svaku komandu koja promeni ensto u igracevom profilu, dodas OnPlayerUpdateEx(playerid);

ako drugi girac to promeni na njemu oept uradis isto samo zamenis playerid.

EDIT: za ostale, OnPlayerUpdateEx(playerid); se koristi u ravensu za cuvanje te sam zato to i napisao ,da vas nezbuni.
Poslednja Izmena: Novembar 21, 2012, 18:19:58 POSLE PODNE od [BR]Maki187

yok nek si ti pametan ja koristim dosta dugo sve lijepo radi :PP

Koristi ga idalje, nek igracu crash acc(tipa nestane struje, nagli izalzak itd), a tvoj sistem koj na svkaih par mintua snima, pa ces videti da mu fali poslednja izmena.

[quote author=
Maki187 link=topic=59829.msg430068#msg430068 date=1353523924]
Koristi ga idalje, nek igracu crash acc(tipa nestane struje, nagli izalzak itd), a tvoj sistem koj na svkaih par mintua snima, pa ces videti da mu fali poslednja izmena.
[/quote]
OnPlayerDisconnect se izvrsi i kod crasha (reason = 0) i ako se tamo poziva funkcija za spremanje nece doci do rollbacka.
Kad bi se spremalo svaki put kad se promjeni igracev status to bi jako usporavalo skriptu, pogotovo uočljivo kod velikog broja konekcija 100-400.
Poslednja Izmena: Novembar 21, 2012, 21:59:26 POSLE PODNE od LordShigi


RESPECT 4 EVER: John, GLC,bAndzi, Nikola, Sop, Zoki, Bruno_Venuti, Mele, Luka P,ExtremePower,Wang(neki kineski frajer)

NAJBOLJI CITATI:
Citat: [GF]Alive poslato Jun 24, 2010, 18:20:19 POSLE PODNE
Paizte ljud mozda je KayLoger! ! !
MOJI RADOVI:
[FS]Trofeji

Citat: LordShigi poslato Novembar 21, 2012, 21:58:19 POSLE PODNE
[quote author=
Maki187 link=topic=59829.msg430068#msg430068 date=1353523924]
Koristi ga idalje, nek igracu crash acc(tipa nestane struje, nagli izalzak itd), a tvoj sistem koj na svkaih par mintua snima, pa ces videti da mu fali poslednja izmena.
OnPlayerDisconnect se izvrsi i kod crasha (reason = 0) i ako se tamo poziva funkcija za spremanje nece doci do rollbacka.
Kad bi se spremalo svaki put kad se promjeni igracev status to bi jako usporavalo skriptu, pogotovo uočljivo kod velikog broja konekcija 100-400.
[/quote]

Cesto se ne detektuje crash sto je testirano, cesto igrac ode off a njegov nalog je idalje ulogovan neko vreme, to je odanvo primeceno.
Sto se tice toga da usporava skriptu, tu se i ne slazem nesto, na 50 igraca je sve bilo normalno, stim da pratim porast cpu i ram memorije, itd, sve je savrseno, dok takav sistem koriste i veci communitiji, stim da sam bas pre koj mesec vodio neku diskusiju o tome, sta vise upravo navedeni sistem sa tajmerom moze da stvori veci lag, jer ce tajmer u istom trenutku svim online igracima snimiti statse, sto stvara izuzetan lag na serveru, na tom broju igraca koj si naveo, ap cak i na troduplo manjem. :)
Igrao sam se sa sve sistemima i testirao ih upravo iz tog razloga, te sam saznao sta je najbolje (za mene i moj server), a mnogi su me poslusali i nisu nikad zazalili. :)

A o istom sistemu sam pricao i sa Gigijem, tad se slozio samnom :)