21.06.2016, 15:04
Por bloc de notas, el bбsico que habнa en el GM The Godfather
Asн estб el cуdigo en pawno
Es mбs largo pero pongo esto para que sepas cуmo es, ayъdame por favor.
Asн estб el cуdigo en pawno
Код:
enum VehicleInfo { Model, Numberplate[MAX_PLAYER_NAME], Float:Positionx, Float:Positiony, Float:Positionz, Float:Angle, Interior, Virtual, Owner[MAX_PLAYER_NAME], Description[MAX_PLAYER_NAME], Owned, Time, Locked, Colorone, Colortwo }; new Vehicle[11][VehicleInfo]; public LoadVehicles() { new arrCoords[15][64]; new strFromFile2[256]; new File: file = fopen("vehicles/vehicles.cfg", io_read); if (file) { new idx; while (idx < sizeof(Vehicle)) { fread(file, strFromFile2); split(strFromFile2, arrCoords, ','); Vehicle[idx][Model] = strval(arrCoords[0]); strmid(Vehicle[idx][Numberplate], arrCoords[1], 0, strlen(arrCoords[1]), 255); Vehicle[idx][Positionx] = floatstr(arrCoords[2]); Vehicle[idx][Positiony] = floatstr(arrCoords[3]); Vehicle[idx][Positionz] = floatstr(arrCoords[4]); Vehicle[idx][Angle] = floatstr(arrCoords[5]); Vehicle[idx][Interior] = strval(arrCoords[6]); Vehicle[idx][Virtual] = strval(arrCoords[7]); strmid(Vehicle[idx][Owner], arrCoords[8], 0, strlen(arrCoords[8]), 255); strmid(Vehicle[idx][Description], arrCoords[9], 0, strlen(arrCoords[9]), 255); Vehicle[idx][Owned] = strval(arrCoords[10]); Vehicle[idx][Time] = strval(arrCoords[11]); Vehicle[idx][Locked] = strval(arrCoords[12]); Vehicle[idx][Colorone] = strval(arrCoords[13]); Vehicle[idx][Colortwo] = strval(arrCoords[14]); idx++; } fclose(file); } return 1; }