[POMOC]Nestaju auta

Započeo JONY, Mart 18, 2012, 11:21:25 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim :BN
Detaljan opis problema:igrac kupi auto .parkira ga.i neka 2-3 dana ga ima poslje mu u statsu ostane ali ga nece prikazati ingame
jednostavno nestane nez koji je problem jel do snimanja ili do ucitavanja
Dio skripte:evo od ucitavanja
stock UcitajVozilo(playerid)
{
new dateiname[128+4];
new playername[MAX_PLAYER_NAME+100];

Carlist[playerid][Typ]=-1; Carlist[playerid][X]=0.0; Carlist[playerid][Y]=0.0; Carlist[playerid][Z]=0.0;
Carlist[playerid][Rotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
Carlist[playerid][Color1]=-1; Carlist[playerid][Color2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][Paintjob]=-1;
Spectating[playerid][0]=-1; Carlist[playerid][BrojRegistracije] = -1;
#if defined CARSELL
offerCar[playerid]={-1,0};
#endif
GetPlayerName(playerid, playername, sizeof(playername));
CheckRPName(playerid, playername);
format(dateiname, sizeof(dateiname), "Vozila/%s.automobil", playername);
if (fexist(dateiname))
{
new File: CarFile = fopen(dateiname, io_read);
if ( CarFile )
{
    new key[ 256 ];
    new Data[ 256 ] , val[ 256];
   
    while ( fread( CarFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey(Data);
if(strcmp(key,"AH_Typ",true)==0) { Carlist[playerid][Typ]=strval(ini_GetValue(Data)); }
else if(strcmp(key,"AH_Vmodel",true)==0) { Carlist[playerid][VehModel]=strval(ini_GetValue(Data)); }
else if(strcmp(key ,"AH_Vlasnik",true)== 0) { val = ini_GetValue( Data ); strmid(Carlist[playerid][Vlasnik], val, 0, strlen(val)-1, 255); }
else if(strcmp(key,"AH_Vlasnik",true)==0) { Carlist[playerid][Vlasnik]=strlen(ini_GetValue(Data)); }
else if(strcmp(key ,"AH_BrojRegistracije",true)== 0) { val = ini_GetValue( Data ); strmid(Carlist[playerid][BrojRegistracije], val, 0, strlen(val)-1, 255); }
else if(strcmp(key,"AH_BrojRegistracije",true)==0) { Carlist[playerid][BrojRegistracije]=strlen(ini_GetValue(Data)); }
else if(strcmp(key,"AH_Cijena",true)==0) { Carlist[playerid][Cijena]=strval(ini_GetValue(Data)); }
else if(strcmp(key,"AH_VMaterijali",true)==0) { Carlist[playerid][CarMats]=strval(ini_GetValue(Data)); }
else if(strcmp(key,"AH_VDroga",true)==0) { Carlist[playerid][CarDroga]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_X",true)==0) { Carlist[playerid][X]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Y",true)==0) { Carlist[playerid][Y]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Z",true)==0) { Carlist[playerid][Z]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Rot",true)==0) { Carlist[playerid][Rotation]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Status",true)==0) { Carlist[playerid][Status]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Lock",true)==0) { Carlist[playerid][Lock]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Paintjob",true)==0) { Carlist[playerid][Paintjob]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Color1",true)==0) { Carlist[playerid][Color1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Color2",true)==0) { Carlist[playerid][Color2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod1",true)==0) { Carlist[playerid][mod1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod2",true)==0) { Carlist[playerid][mod2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod3",true)==0) { Carlist[playerid][mod3]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod4",true)==0) { Carlist[playerid][mod4]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod5",true)==0) { Carlist[playerid][mod5]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod6",true)==0) { Carlist[playerid][mod6]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod7",true)==0) { Carlist[playerid][mod7]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod8",true)==0) { Carlist[playerid][mod8]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod9",true)==0) { Carlist[playerid][mod9]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod10",true)==0) { Carlist[playerid][mod10]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod11",true)==0) { Carlist[playerid][mod11]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod12",true)==0) { Carlist[playerid][mod12]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod13",true)==0) { Carlist[playerid][mod13]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod14",true)==0) { Carlist[playerid][mod14]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod15",true)==0) { Carlist[playerid][mod15]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod16",true)==0) { Carlist[playerid][mod16]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod17",true)==0) { Carlist[playerid][mod17]=strval(ini_GetValue(Data)); }
}
}
    fclose(CarFile);
    if(Carlist[playerid][Typ]!=-1)
    {
Carlist[playerid][Carid] +=1;
        Carlist[playerid][Carid]=CreateTunedCar(playerid);
SetVehicleNumberPlate(Carlist[playerid][Carid], Carlist[playerid][BrojRegistracije]);
}
}
return 1;
}


evo i dio pod onplayerdisconect
public OnPlayerDisconnect(playerid)
{

new dateiname[MAX_PLAYER_NAME+46];
new playername[MAX_PLAYER_NAME];
new var[128];
    GetPlayerName(playerid, playername, sizeof(playername));
format(dateiname, sizeof(dateiname), "Vozila/%s.automobil", playername);
new File: CarFile = fopen(dateiname, io_write);
    format(var, 256, "AH_Typ=%i\n", Carlist[playerid][Typ]); fwrite(CarFile, var);
format(var, 256, "AH_Vmodel=%i\n", Carlist[playerid][VehModel]); fwrite(CarFile, var);
format(var, 256, "AH_Vlasnik=%s\n", Carlist[playerid][Vlasnik]); fwrite(CarFile, var);
format(var, 256, "AH_BrojRegistracije=%s\n", Carlist[playerid][BrojRegistracije]); fwrite(CarFile, var);
format(var, 256, "AH_VCijena=%i\n", Carlist[playerid][Cijena]); fwrite(CarFile, var);
format(var, 256, "AH_Matsi=%i\n", Carlist[playerid][CarMats]); fwrite(CarFile, var);
format(var, 256, "AH_Droga=%i\n", Carlist[playerid][CarDroga]); fwrite(CarFile, var);
    format(var, 256, "AH_X=%f\n", Carlist[playerid][X]); fwrite(CarFile, var);
format(var, 256, "AH_Y=%f\n", Carlist[playerid][Y]); fwrite(CarFile, var);
format(var, 256, "AH_Z=%f\n", Carlist[playerid][Z]); fwrite(CarFile, var);
format(var, 256, "AH_Rot=%f\n", Carlist[playerid][Rotation]); fwrite(CarFile, var);
format(var, 256, "AH_Status=%i\n", Carlist[playerid][Status]); fwrite(CarFile, var);
format(var, 256, "AH_Lock=%i\n", Carlist[playerid][Lock]); fwrite(CarFile, var);
format(var, 256, "AH_Paintjob=%i\n", Carlist[playerid][Paintjob]); fwrite(CarFile, var);
format(var, 256, "AH_Color1=%i\n", Carlist[playerid][Color1]); fwrite(CarFile, var);
format(var, 256, "AH_Color2=%i\n", Carlist[playerid][Color2]); fwrite(CarFile, var);
format(var, 256, "AH_mod1=%i\n", Carlist[playerid][mod1]); fwrite(CarFile, var);
format(var, 256, "AH_mod2=%i\n", Carlist[playerid][mod2]); fwrite(CarFile, var);
format(var, 256, "AH_mod3=%i\n", Carlist[playerid][mod3]); fwrite(CarFile, var);
format(var, 256, "AH_mod4=%i\n", Carlist[playerid][mod4]); fwrite(CarFile, var);
format(var, 256, "AH_mod5=%i\n", Carlist[playerid][mod5]); fwrite(CarFile, var);
format(var, 256, "AH_mod6=%i\n", Carlist[playerid][mod6]); fwrite(CarFile, var);
format(var, 256, "AH_mod7=%i\n", Carlist[playerid][mod7]); fwrite(CarFile, var);
format(var, 256, "AH_mod8=%i\n", Carlist[playerid][mod8]); fwrite(CarFile, var);
format(var, 256, "AH_mod9=%i\n", Carlist[playerid][mod9]); fwrite(CarFile, var);
format(var, 256, "AH_mod10=%i\n", Carlist[playerid][mod10]); fwrite(CarFile, var);
format(var, 256, "AH_mod11=%i\n", Carlist[playerid][mod11]); fwrite(CarFile, var);
format(var, 256, "AH_mod12=%i\n", Carlist[playerid][mod12]); fwrite(CarFile, var);
format(var, 256, "AH_mod13=%i\n", Carlist[playerid][mod13]); fwrite(CarFile, var);
format(var, 256, "AH_mod14=%i\n", Carlist[playerid][mod14]); fwrite(CarFile, var);
format(var, 256, "AH_mod15=%i\n", Carlist[playerid][mod15]); fwrite(CarFile, var);
format(var, 256, "AH_mod16=%i\n", Carlist[playerid][mod16]); fwrite(CarFile, var);
format(var, 256, "AH_mod17=%i\n", Carlist[playerid][mod17]); fwrite(CarFile, var);
    fclose(CarFile);
    if(Carlist[playerid][Carid]!=-1)
{
SetVehicleParamsForAll(Carlist[playerid][Carid],0,0);
DestroyVehicle(Carlist[playerid][Carid]);
Carlist[playerid][Carid]=-1;
}
if(usingcarwash == playerid)
{
    SetVehicleToRespawn(GetPlayerVehicleID(playerid));
    usingcarwash = -1;
    Update3DTextLabelText(entrancetext, 0x008B00FF, "Niko nekoristi perionicu.Cena: 5$ (/carwash)");
}
SacuvajIgraca(playerid);
new house = PlayerInfo[playerid][pPhousekey];
if (house != 255 && PlayerInfo[playerid][pHCar] == 1)
{
DestroyVehicle(HouseVehicle[playerid]);
}
    if (Spectating[playerid][0]!=-1)
    {
        SetVehicleParamsForAll(Buylist[Spectating[playerid][0]][Carid],0,0);
        Spectating[playerid][0]=-1;
}

plsss help

Vegas.


sry zbog dp otisla tema daleko jel ko zna ili ne da se ne nadam plss