13.09.2009, 16:38
Ok. I edited a bit of my code to discover DestroyVehicle wasn't the actual problem. The problem (I think) is that the vehicle doesn't get created.
VehicleCount; is for counting Vehicle IDs
EDIT: Yes I forgot to say that at the end no vehicle is created. BTW sorry for indentation, the forum fucks it up
Please help me get why the vehicles aren't getting created/get destroyed!
Thanx
Код:
stock CreateVehicleEx(vehicletype,Float:x,Float:y,Float:z,Float:rot,color1,color2,resp,owner[],cost) { VehicleCount++; new str[128]; format(str,128,"WSSFILES/CARDATA/%d.xcu",VehicleCount); if(fexist(str)) { VehicleVar[VehicleCount][vtype]=djInt(str,"VehicleType",false); VehicleVar[VehicleCount][carX]=djFloat(str,"X",false); VehicleVar[VehicleCount][carY]=djFloat(str,"Y",false); VehicleVar[VehicleCount][carZ]=djFloat(str,"Z",false); VehicleVar[VehicleCount][carRot]=djFloat(str,"Rot",false); VehicleVar[VehicleCount][vcolor1]=djInt(str,"color1",false); VehicleVar[VehicleCount][vcolor2]=djInt(str,"color2",false); VehicleVar[VehicleCount][resp_time]=djInt(str,"Resp",false); CreateVehicle(VehicleVar[VehicleCount][vtype],VehicleVar[VehicleCount][carX],VehicleVar[VehicleCount][carY],VehicleVar[VehicleCount][carZ],VehicleVar[VehicleCount][carRot],VehicleVar[VehicleCount][vcolor1],VehicleVar[VehicleCount][vcolor2],VehicleVar[VehicleCount][resp_time]); format(VehicleVar[VehicleCount][ownername],24,"%s",dj(str,"Owner",false)); VehicleVar[VehicleCount][value]=djInt(str,"Cost",false); } else { // .... } if(!strcmp(VehicleVar[VehicleCount][ownername],"ForSale")) { VehicleVar[VehicleCount][locked]=0; } if(!strcmp(VehicleVar[VehicleCount][ownername],"SFPD")) { VehicleVar[VehicleCount][locked]=1; } VehicleVar[VehicleCount][engine]=0; return VehicleCount; }
EDIT: Yes I forgot to say that at the end no vehicle is created. BTW sorry for indentation, the forum fucks it up
Please help me get why the vehicles aren't getting created/get destroyed!
Thanx