Server vehicle doesnt spawn on the second time.
#1

PHP код:
public OnGameModeExit()
{
FadeExit();
for(new 
maxcars 0maxcars 1000maxcars++)
{
new 
iLoveKrustyKrab[128];
format(iLoveKrustyKrab128"Vehicles/%d.ini"maxcars);
if(!
dfile_FileExists(iLoveKrustyKrab)) continue;
dfile_Open(iLoveKrustyKrab);
dfile_WriteInt("Spawned"0);
dfile_SaveFile();
dfile_CloseFile();
printf("Vehicle File %d changed to spawned 0"maxcars);
}
for(new 
ik 0ik MAX_PLAYERSik++)
{
if(
Logged[ik] == 1)
{
OnPlayerDisconnect(ik0);
}
}
    return 
1;

And this is in OnGameModeInit pub:
PHP код:
    for(new i=0i<999i++)
    {
    new 
ch1[128];
    
format(ch1sizeof(ch1), "Vehicles/%d.ini"i);
    if(
dfile_FileExists(ch1))
    {
    
dfile_Open(ch1);
    if(
dfile_ReadInt("Server") == 1)
    {
    
LoadVehicle(i);
     
dfile_SaveFile();
      
dfile_CloseFile();
    }
    }
    } 
It works but only once, it saves the vehicle file once and the next time it deletes all the contain and doesn't spawn the vehicle. (Two GMXs.)
Reply
#2

BUMP
Reply
#3

ARe you using streamer plugin to create that vehicles?
Look here for more information
Reply
#4

I mean, one the second I restart the server it deletes all the contain of the vehicle file.
Reply
#5

bump
Reply
#6

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)