[POMOC]Ne ucitava vozila

Započeo JONY, Mart 12, 2012, 16:07:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:BN
Detaljan opis problema:pa igrac kupi vozilo.i nekoliko puta ode relog.msm 4-5 dana to bude i onda nece da ucita auta msm u statsu ostane al ga nema nigde jednostavno nestane
Dio skripte: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;
}