y_ini don't save anything in user file ex. DeadUBG.ini
#1

Hello

This bug is only on my new server(PC)...

When new player register y_ini create file with name ex. if my name is DeadUBG create file DeadUBG.ini but it is empty...

Please help me...

Thank you
Reply
#2

help?
Reply
#3

use dini instead
Reply
#4

Quote:
Originally Posted by gipa069
Посмотреть сообщение
use dini instead
Stop giving wrong advises. Dini is not good for storing player statistics and it's very slow indeed. Use SQL for much more optimizations and more speed.

O.T:

Please show us the code where you save the player statistics so that we can get a hint about the problem.
Reply
#5

Here is part of script but on my first PC some script save data in ini but in my second PC some script don't save data in ini

PHP код:
if(fexist(GunPath(playerid)))
    {
        
INI_ParseFile(GunPath(playerid), "LoadGun_%s", .bExtra true, .extra playerid);
        
IsPlayersFirstSpawn{playerid} = true;
    }
    else
    {
        new 
File:startfile fopen(GunPath(playerid), io_write);
        
fclose(startfile);
    }
    if(
fexist(PosPath(playerid)))
    {
        
INI_ParseFile(PosPath(playerid), "LoadPos_%s", .bExtra true, .extra playerid);
        
IsPlayersFirstSpawn{playerid} = true;
    }
    else
    {
        new 
File:startfile fopen(PosPath(playerid), io_write);
        
fclose(startfile);
    }
    new 
bankfile[40];
    
format(bankfilesizeof(bankfile), BANK_FILEGetName(playerid));
    if(
fexist(bankfile))
    {
        
INI_ParseFile(bankfile"LoadBank_%s", .bExtra true, .extra playerid);
        if(
BankInfo[playerid][Balance] < 0)
        {
            
BankInfo[playerid][Balance] = 0;
        }
        if(
BankInfo[playerid][Credit] < 0)
        {
            
BankInfo[playerid][Credit] = 0;
        }
        if(
BankInfo[playerid][Debt] < 0)
        {
            
BankInfo[playerid][Debt] = 0;
        }
    }
    else
    {
        
BankInfo[playerid][Balance] = 0;
        
BankInfo[playerid][Credit] = 0;
        
BankInfo[playerid][Debt] = 0;
        
BankInfo[playerid][Fees] = 0;
        
BankInfo[playerid][Transactions] = 0;
        new 
bFilee[40];
        
format(bFileesizeof(bFilee), BANK_FILEGetName(playerid));
        new 
INI:file INI_Open(bFilee);
        
INI_WriteInt(file"Balance"BankInfo[playerid][Balance]);
        
INI_WriteInt(file"Credit"BankInfo[playerid][Credit]);
        
INI_WriteInt(file"Debt"BankInfo[playerid][Debt]);
        
INI_WriteInt(file"Fees"BankInfo[playerid][Fees]);
        
INI_WriteInt(file"Transactions"BankInfo[playerid][Transactions]);
        
INI_Close(file);
    }
    
FightStyleID{playerid} = 5;
    new 
stylefile[40];
    
format(stylefilesizeof(stylefile), STYLE_FILEGetName(playerid));
    if(
fexist(stylefile))
    {
        
INI_ParseFile(stylefile"LoadStyle_%s", .bExtra true, .extra playerid);
    }
    else
    {
        new 
INI:ffile INI_Open(stylefile);
        
INI_WriteInt(ffile"FightStyle"0);
        
FightStyleID{playerid} = 0;
        
INI_Close(ffile);
    }
    new 
degreefile[40];
    
format(degreefilesizeof(degreefile), DEGREE_FILEGetName(playerid));
    if(
fexist(degreefile))
    {
        
INI_ParseFile(degreefile"LoadDegree_%s", .bExtra true, .extra playerid);
    }
    else
    {
        
DegreeInfo[playerid][dReal] = 0;
        
DegreeInfo[playerid][dLaw] = 0;
        
DegreeInfo[playerid][dDefense] = 0;
        
DegreeInfo[playerid][dHealth] = 0;
        
DegreeInfo[playerid][dMechanic] = 0;
        
DegreeInfo[playerid][dDealer] = 0;
        
DegreeInfo[playerid][dWeapons] = 0;
        new 
INI:dfile INI_Open(degreefile);
        
INI_WriteInt(dfile"dReal"DegreeInfo[playerid][dReal]);
        
INI_WriteInt(dfile"dLaw"DegreeInfo[playerid][dLaw]);
        
INI_WriteInt(dfile"dDefense"DegreeInfo[playerid][dDefense]);
        
INI_WriteInt(dfile"dHealth"DegreeInfo[playerid][dHealth]);
        
INI_WriteInt(dfile"dMechanic"DegreeInfo[playerid][dMechanic]);
        
INI_WriteInt(dfile"dDealer"DegreeInfo[playerid][dDealer]);
        
INI_WriteInt(dfile"dWeapons"DegreeInfo[playerid][dWeapons]);
        
INI_Close(dfile);
    }
    new 
userfile[40];
    
format(userfilesizeof(userfile), USER_FILEGetName(playerid));
    if(
fexist(userfile))
    {
        
INI_ParseFile(userfile"LoadUser_%s", .bExtra true, .extra playerid);
        new 
check[150];
        new 
File:checkfile fopen(userfileio_read);
        while(
fread(checkfilecheck))
        {
            if(
strcmp(check"Banned = 1"false) == || strcmp(check"Banned=1"false) == 0)
            {
                
format(fstr2sizeof(fstr2), "%s [%d] беше кикнат от BG-C'n'R - Причина: Името е баннато"GetName(playerid), playerid);
                
SendClientMessageToAll(REDfstr2);
                
Kick(playerid);
                return 
1;
            }
            else
            {
                
format(fstr2,sizeof(fstr2),"{FFFFFF}Добре дошли %s!\n\nНапишете паролата си, за да влезете:"GetName(playerid));
                
ShowPlayerDialog(playeridLOGIN_MENUDIALOG_STYLE_PASSWORD"{FFFFFF}BG-C'n'R Login"fstr2"Вход""Отказ");
            }
        }
    }
    else
    {
        
PlayerInfo[playerid][aLevel] = 0;
        
PlayerInfo[playerid][vLevel] = 0;
        
PlayerInfo[playerid][pCash] = 10000;
        
PlayerInfo[playerid][pScore] = 0;
        
PlayerInfo[playerid][pKills] = 0;
        
PlayerInfo[playerid][pDeaths] = 0;
        
PlayerInfo[playerid][pHoldups] = 0;
        
PlayerInfo[playerid][pCrimes] = 0;
        
PlayerInfo[playerid][pFined] = 0;
        
PlayerInfo[playerid][pArrests] = 0;
        
PlayerInfo[playerid][pTakedowns] = 0;
        
PlayerInfo[playerid][pTickets] = 0;
        
PlayerInfo[playerid][pRope] = 0;
        
PlayerInfo[playerid][pPaintCan] = 0;
        
PlayerInfo[playerid][pScissors] = 0;
        
PlayerInfo[playerid][pKits] = 0;
        
PlayerInfo[playerid][vLock] = 0;
        
PlayerInfo[playerid][Helper] = 0;
        
PlayerInfo[playerid][hHelper] = 0;
        
PlayerInfo[playerid][pWarns] = 0;
        
PlayerInfo[playerid][pKicks] = 0;
        
PlayerInfo[playerid][pJoins] = 1;
        
PlayerInfo[playerid][pArrests] = 0;
        
PlayerInfo[playerid][pMaterials] = 0;
        
PlayerInfo[playerid][Banned] = 0;
        
PlayerInfo[playerid][jTime] = 0;
        
PlayerInfo[playerid][pWanted] = 0;
        
PlayerInfo[playerid][pArmour] = 0.0;
        
PlayerInfo[playerid][pHealth] = 0.0;
        
PlayerInfo[playerid][cTime] = 0;
        new 
INI:ufile INI_Open(userfile);
        
INI_WriteInt(ufile"aLevel",PlayerInfo[playerid][aLevel]);
        
INI_WriteInt(ufile"vLevel",PlayerInfo[playerid][vLevel]);
        
INI_WriteInt(ufile"pCash"PlayerInfo[playerid][pCash]);
        
INI_WriteInt(ufile"pScore"PlayerInfo[playerid][pScore]);
        
INI_WriteInt(ufile"pKills"PlayerInfo[playerid][pKills]);
        
INI_WriteInt(ufile"pDeaths"PlayerInfo[playerid][pDeaths]);
        
INI_WriteInt(ufile"pHoldups"PlayerInfo[playerid][pHoldups]);
        
INI_WriteInt(ufile"pCrimes"PlayerInfo[playerid][pCrimes]);
        
INI_WriteInt(ufile"pFined"PlayerInfo[playerid][pFined]);
        
INI_WriteInt(ufile"pArrests"PlayerInfo[playerid][pArrests]);
        
INI_WriteInt(ufile"pTakedowns"PlayerInfo[playerid][pTakedowns]);
        
INI_WriteInt(ufile"pTickets"PlayerInfo[playerid][pTickets]);
        
INI_WriteInt(ufile"pRope"PlayerInfo[playerid][pRope]);
        
INI_WriteInt(ufile"pPaintCan"PlayerInfo[playerid][pPaintCan]);
        
INI_WriteInt(ufile"pScissors"PlayerInfo[playerid][pScissors]);
        
INI_WriteInt(ufile"pKits"PlayerInfo[playerid][pKits]);
        
INI_WriteInt(ufile"vLock"PlayerInfo[playerid][vLock]);
        
INI_WriteInt(ufile"Helper"PlayerInfo[playerid][Helper]);
        
INI_WriteInt(ufile"hHelper"PlayerInfo[playerid][hHelper]);
        
INI_WriteInt(ufile"pWarns"PlayerInfo[playerid][pWarns]);
        
INI_WriteInt(ufile"pKicks"PlayerInfo[playerid][pKicks]);
        
INI_WriteInt(ufile"pJoins"PlayerInfo[playerid][pJoins]);
        
INI_WriteInt(ufile"pMaterials"PlayerInfo[playerid][pMaterials]);
        
INI_WriteInt(ufile"Banned"PlayerInfo[playerid][Banned]);
        
INI_WriteInt(ufile"jTime"PlayerInfo[playerid][jTime]);
        
INI_WriteInt(ufile"pWanted"PlayerInfo[playerid][pWanted]);
        
INI_WriteFloat(ufile"pArmour"PlayerInfo[playerid][pArmour]);
        
INI_WriteFloat(ufile"pHealth"PlayerInfo[playerid][pHealth]);
        
INI_WriteInt(ufile"cTime"PlayerInfo[playerid][cTime]);
        
INI_Close(ufile);
        
format(fstr,sizeof(fstr),"{FFFFFF}Добре дошли %s, в BG-Cops'n'Robbers! Вие не сте регистриран,\nнапишете паролата Ви, за да се регистрирате:"GetName(playerid));
        
ShowPlayerDialog(playeridREGISTER_MENUDIALOG_STYLE_PASSWORD"{FFFFFF}BG-C'n'R Register"fstr"Регистрация""Отказ");
    }
    
SetPlayerMapIcon(playerid02296.2930,2461.4600,38.6875300MAPICON_LOCAL);//nvpd
    
SetPlayerMapIcon(playerid12270.9761,2293.8179,10.8203520MAPICON_LOCAL);//nv city bank
    
SetPlayerMapIcon(playerid22127.5869,2379.6211,10.8203440MAPICON_LOCAL);//isle casino
    
SetPlayerMapIcon(playerid32016.9768,1916.4065,12.3424440MAPICON_LOCAL);//new vegas casino
    
SetPlayerMapIcon(playerid42196.9570,1677.1637,12.3672250MAPICON_LOCAL);//caligulas casino
    
SetPlayerMapIcon(playerid52019.3196,1007.7487,10.8203430MAPICON_LOCAL);//4 dragons casino
    
SetPlayerMapIcon(playerid62159.5405,943.1776,10.820360MAPICON_LOCAL);//ammu1
    
SetPlayerMapIcon(playerid72367.0552,2071.0693,10.8203100MAPICON_LOCAL);//burger1
    
SetPlayerMapIcon(playerid92393.2737,2041.5657,10.8203140MAPICON_LOCAL);//cluck1
    
SetPlayerMapIcon(playerid102472.8655,2034.1702,11.0625100MAPICON_LOCAL);//burger2
    
SetPlayerMapIcon(playerid112452.5308,2065.1902,10.8203500MAPICON_LOCAL);//24/1
    
SetPlayerMapIcon(playerid122546.5271,1972.6571,10.8203500MAPICON_LOCAL);//24/2
    
SetPlayerMapIcon(playerid132412.5039,1123.8190,10.8203300MAPICON_LOCAL);//cityhall
    
SetPlayerMapIcon(playerid142194.9390,1990.9948,12.2969500MAPICON_LOCAL);//24/3
    
SetPlayerMapIcon(playerid151658.4960,2250.0437,11.0701430MAPICON_LOCAL);//redsands casino
    
SetPlayerMapIcon(playerid161607.3329,1816.7660,10.8203220MAPICON_LOCAL);//hospital
    
SetPlayerMapIcon(playerid171672.5485,1447.8712,10.788150MAPICON_LOCAL);//airport
    
SetPlayerMapIcon(playerid181157.9246,2072.2874,11.0625100MAPICON_LOCAL);//burger3
    
SetPlayerMapIcon(playerid19937.0844,1733.2168,8.8516300MAPICON_LOCAL);//cia
    
SetPlayerMapIcon(playerid20776.7208,1871.4360,4.906860MAPICON_LOCAL);//ammu2
    
SetPlayerMapIcon(playerid21173.0402,1177.1461,14.7578140MAPICON_LOCAL);//cluck2
    
SetPlayerMapIcon(playerid22, -316.1609,829.8887,14.242260MAPICON_LOCAL);//ammu3
    
SetPlayerMapIcon(playerid23, -1508.8851,2610.7004,55.835960MAPICON_LOCAL);//ammu4
    
SetPlayerMapIcon(playerid242169.4143,2795.9263,10.8203100MAPICON_LOCAL);//burger4
    
SetPlayerMapIcon(playerid25, -1457.9816,2589.9771,55.9957520MAPICON_LOCAL);//el que bank
    
SetPlayerMapIcon(playerid26, -179.1975,1133.1324,19.7422520MAPICON_LOCAL);//fort bank
    
SetPlayerMapIcon(playerid27, -828.1474,1504.5988,19.8529520MAPICON_LOCAL);//los barraques bank
    
SetPlayerMapIcon(playerid282351.8555,2533.6199,10.8203290MAPICON_LOCAL);//pizza1
    
SetPlayerMapIcon(playerid292556.9512,2065.3730,11.099560MAPICON_LOCAL);//ammu5
    
SetPlayerMapIcon(playerid301735.7432,1866.1516,10.8203550MAPICON_LOCAL);//carshop
    
SetPlayerMapIcon(playerid312114.8848,920.2251,10.8203270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid322639.7700,1106.1627,10.8203270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid332202.4160,2474.7686,10.8203270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid342147.2354,2747.9351,10.8203270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid351596.1118,2198.9944,10.8203270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid36612.0298,1695.0731,6.9922270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid37, -1328.3317,2677.4412,50.0625270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid38, -1471.3004,1864.1031,32.6328270MAPICON_LOCAL);//service station
    
SetPlayerMapIcon(playerid392311.2742,2324.2349,10.8203480MAPICON_LOCAL);//night club
    
SetPlayerMapIcon(playerid402319.3486,2391.8047,10.820360MAPICON_LOCAL);//ammu6
    
SetPlayerMapIcon(playerid452247.6702,2396.1687,10.8203500MAPICON_LOCAL);//24/4
    
SetPlayerMapIcon(playerid461872.2554,2071.8850,11.0625100MAPICON_LOCAL);//burger5
    
SetPlayerMapIcon(playerid47, -1213.8292,1830.3749,41.9297140MAPICON_LOCAL);//cluck3
    
SetPlayerMapIcon(playerid482447.6692,2376.2556,12.1635300MAPICON_LOCAL);//FBI HQ
    
SetPlayerMapIcon(playerid491968.7693,2295.8730,16.4559540MAPICON_LOCAL);//NV GYM
    
SetPlayerMapIcon(playerid50966.2469,2160.6836,10.8203560MAPICON_LOCAL);//Mats pickup(LV)
    
SetPlayerMapIcon(playerid51, -2488.5205,2295.3135,4.9844560MAPICON_LOCAL);//Mats pickup(BS)
    
SetPlayerMapIcon(playerid522375.5786,2306.3044,8.1406360MAPICON_LOCAL);//NVU
    
SetPlayerMapIcon(playerid531976.0565,2162.1646,11.0703630MAPICON_LOCAL);//Paint Shop
    
SetPlayerMapIcon(playerid54, -1420.3623,2583.7390,55.8433630MAPICON_LOCAL);//Paint Shop
    
SetPlayerMapIcon(playerid55, -99.9229,1118.1846,19.7417630MAPICON_LOCAL);//Paint Shop
    
SetPlayerMapIcon(playerid561602.5015,1615.4475,10.8203270MAPICON_LOCAL);//Airport service station
    
SetPlayerMapIcon(playerid57, -2322.4451,2298.0378,-0.5677270MAPICON_LOCAL);//Bayside marina service station
    
SetPlayerMapIcon(playerid582305.9966,2377.8203,11.2208490MAPICON_LOCAL);//New Vegas Bar
    
SetPlayerMapIcon(playerid592364.8955,2377.6169,10.8203310MAPICON_LOCAL);//New Vegas Apartments
    
format(fstr3sizeof(fstr3),"[BG-C'n'R]: %s [%d] влезе в сървъра..."GetName(playerid), playerid);
    
SendClientMessageToAll(GREYfstr3);
    new 
ip[50], stringg[150];
    
GetPlayerIp(playeridipsizeof(ip));
    
format(stringgsizeof(stringg),"[BG-C'n'R]: %s [%d] - %s"GetName(playerid), playeridip);
    
SendAdminMessage(GREYstringg);
     
SendClientMessage(playeridWHITE"BG-C'n'R >>> Здравейте в BG-C'n'R | Собственик DeadMasterBG © 2015 - 2016");
    
SendClientMessage(playeridRED"Този сървър НЕ е деадмач прочетете /rules преди да започнете да играете!");
    
SendClientMessage(playeridLIGHTGREEN"Този сървър е направен за забава...");
    
SendClientMessage(playeridORANGE"Използвайте /help и /faqs за помощ, може да използвате /n и /askadmin за още помощ...");
    
GameTextForPlayer(playerid"~n~ ~n~ ~n~ ~n~ ~w~Welcome to ~g~Bulgaria ~n~~b~Cops ~w~and ~r~Robbers!"50001);
    return 
1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)