2020-05-26, 01:59 AM
(2020-05-26, 01:47 AM)SKainer Wrote: Te hice este peque?o y sencillo script que tal vez no sea lo que quieras exactamente pero ?salo como ejemplo o plantilla
PHP Code:new vehicle_taxi1; // Variable global del veh?culo public OnVehicleSpawn(vehicleid) // Usamos este callback para cuando el veh?culo se spawnee { ? ?if(San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_TYPE] == VEHICLE_TYPE_WORK) ? // Condicional de si el vehiculo es tipo de?trabajo ? ?{ ? ? ? ?if(San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_TYPE_IN] == WORK_TAXI) ? ? ? // Condicional de si el vehiculos es tipo trabajo taxi ? ? ? ?{ ? ? ? ? ? ?// Esto lo hice para que la linea no sea tan larga ? ? ? ? ? ?new modelid = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_MODELID]; ? ? ? ? ? ?new floatx = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_SPAWN_X]; ? ? ? ? ? ?new floaty = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_SPAWN_Y]; ? ? ? ? ? ?new floatz = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_SPAWN_Z]; ? ? ? ? ? ?new floata = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_SPAWN_ANGLE]; ? ? ? ? ? ?new color1 = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_COLOR_1]; ? ? ? ? ? ?new color2 = San_Andreas_Vehicles[vehicleid][san_andreas_vehicle_COLOR_2]; ? ? ? ? ? ?vehicle_taxi1 = AddStaticVehicle(modelid, floatx, floaty, floatz, floata, color1, color2); ? ? ? ? ? ?AttachObjectToVehicle(objectid, vehicle_taxi1, ...); ? ? ? ?} ? ? ? ?// Tus otros vehiculos de trabajo ? ?} ? ?return 1; }
Entonces esto:
PHP Code:
{VEHICLE_TYPE_WORK, WORK_TAXI, 0, 420, 1792.5676, -1868.2953, 13.2887, 0.0000, 6, 1, 0},
Debe desaparecer?? Se agregar?a en el ejemplo que me pusiste que vendria ir aca
? ? ? ? ? ?
PHP Code:
vehicle_taxi1 = AddStaticVehicle(modelid, floatx, floaty, floatz, floata, color1, color2);
? ? ? ? ? ?AttachObjectToVehicle(objectid, vehicle_taxi1, ...);
