SA-MP Forums Archive
I need help really fast - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help really fast (/showthread.php?tid=613705)



I need help really fast - Micko123 - 30.07.2016

I am trying to make dynamic billboard system but i have this problem. When i create billboard it won't save it.
Here is what i got
PHP код:
#define BILBORD_FILE        "Bilbordi/%d.ini"
    
for(new 0sizeof(BilbordInfo); i++)
    {
        new 
baFile[50];
        
format(baFilesizeof(baFile), BILBORD_FILEi);
        if(
fexist(baFile))
        {
             
INI_ParseFile(baFile"UcitajBilbord", .bExtra true, .extra i);
            
KreirajBilbord(i);
        }
    }
public 
OnGameModeExit()
{
    for(new 
ba 0ba sizeof(BilbordInfo); ba++) { SacuvajBilbord(ba); }
    return 
1;
}
forward UcitajBilbord(bilbordid,  name[], value[]);
public 
UcitajBilbord(bilbordidname[], value[])
{
    
INI_Int("Postavljen",BilbordInfo[bilbordid][bPostavljen]);
    
INI_Float("X",BilbordInfo[bilbordid][bX]);
    
INI_Float("Y",BilbordInfo[bilbordid][bY]);
    
INI_Float("Z",BilbordInfo[bilbordid][bZ]);
    
INI_Float("Angle",BilbordInfo[bilbordid][bAngle]);
    
INI_Int("Int",BilbordInfo[bilbordid][bInt]);
    
INI_Int("VW",BilbordInfo[bilbordid][bVW]);
    return 
1;
}
stock SacuvajBilbord(bilbordid)
{
    new 
kFile[80];
    
format(kFilesizeof(kFile), BILBORD_FILEbilbordid);
    new 
INI:File INI_Open(kFile);
    
INI_WriteInt(File,"Postavljen",BilbordInfo[bilbordid][bPostavljen]);
    
INI_WriteFloat(File,"X",BilbordInfo[bilbordid][bX]);
    
INI_WriteFloat(File,"Y",BilbordInfo[bilbordid][bY]);
    
INI_WriteFloat(File,"Z",BilbordInfo[bilbordid][bZ]);
    
INI_WriteFloat(File,"Angle",BilbordInfo[bilbordid][bAngle]);
    
INI_WriteInt(File,"Int",BilbordInfo[bilbordid][bInt]);
    
INI_WriteInt(File,"VW",BilbordInfo[bilbordid][bVW]);
    
INI_Close(File);
    return 
1;

What to do?? It won't create folder in Scriptfiles


Re: I need help really fast - JustMe.77 - 30.07.2016

I think you have to create the folder by yourself, the system will create the file then (I could be wrong)


Re: I need help really fast - Micko123 - 30.07.2016

Nope. Still won't create files