sirusxxxx Posted August 18, 2009 Share Posted August 18, 2009 Hey guys I am doing a racing script and I am trying to get the opponents car to spawn with wheels and a paint job does anyone know if I did this correctly? 06BB: set_actor [email protected] drive_car [email protected] speed 999.0 along_SCM_path Car.LockInCurrentPosition([email protected]) = False09E9: car [email protected] add_single_nitro 06E5: (unknown) $CARMOD_CAR $10449($2515,16i) $10465($2515,16i) 06E6: (unknown) $10188 $10189 06E7: [email protected] = add_car_component #WHEEL_OR1 to_car [email protected] 06E9: request_car_component #WHEEL_OR1 06EA: car_component $10415 available 06EB: release_car_component #WHEEL_OR1 06EC: (unknown) $CARMOD_CAR $10446 06ED: set_car [email protected] paintjob 0 06D5: [email protected] = create_racing_checkpoint_at 2166.64 -1850.868 3.984375 point_to 2165.723 -1848.055 3.5026 type 1 radius 8.0 As well is their a way to randomize which paint jobs are choosen? As well is their a way to switch wheels if the first wheel choice isnt set in the handling lines for the opponents car choosen? Link to comment Share on other sites More sharing options...
ZAZ Posted August 18, 2009 Share Posted August 18, 2009 you must set your codes into a context script opcode 0209 choose randomly a value between 2 values of the last 2 parameters and submit to the variable 0209: [email protected] = random_int 0 606ED: set_car [email protected] paintjob [email protected] then it choose one of paintjob 0,1,2,3,4,5 or 6 if the model don't have such a paintjob txd, it do do nothing 0209: [email protected] = random_int 0 206ED: set_car [email protected] paintjob [email protected] choose between 0 and 2 would have a better chance to give the car a paintjob you can change the wheels of all vehicles which have wheels and choose all available wheels, defined in veh_mods.ide CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 18, 2009 Author Share Posted August 18, 2009 Thanks ZaZ for the spawn color random code! you might remeber I am the old memebr but lost my password: 1stGenLX-Turbo and the nfs run script... Anyways I also have other race scripts where you race a harder opponents after each win and if you lose you go back to start. Since each opponent is seperate in the script I want them to spawn with different modifications. Is that possible? Easy oponent - spawns with wheels, wings, scoops 1 stage nitrous hard oponent - spawns with easy stuff, and body kit, stage 10 nirtous So far all I can spawn is paint jobs and first stage nos, do you know a add car component line to spawn at race start? Link to comment Share on other sites More sharing options...
ZAZ Posted August 19, 2009 Share Posted August 19, 2009 So far all I can spawn is paint jobs and first stage nos, do you know a add car component line to spawn at race start? A capitel of CLEO Script Tutorial: Tuning parts It needs 4 steps 1. first step to load the tuning part 06E9: request_car_component #hydralics06E9: request_car_component #NTO_B_S06E9: request_car_component 1115 2. second step to prove if the model is loaded in an extra "load-model-check-Loop" :Load_Model_Check0001: wait 0 msif and06EA: car_component_available #hydralics06EA: car_component_available #NTO_B_S06EA: car_component_available 1115004D: jump_if_false @Load_Model_Check 3. The tuning part can be created as soon as the model file is loaded by attaching to the car 06E7: [email protected] = add_car_component #NTO_B_S to_car [email protected]: [email protected] = add_car_component #hydralics to_car [email protected]: [email protected] = add_car_component 1115 to_car [email protected] 4. release the loaded tuning part model file if it is not needed anymore 06EB: release_car_component #hydralics06EB: release_car_component #NTO_B_S06EB: release_car_component 1115 To release the defined item from script is not nessesary The script below spawns the car SLAMVAN with nitro, hydraulics and front bumper and the paintjob 1 in Grovestreet if player goes into red marker Adding paintjobs needs first to give the car white colors Painjobs requires existing paintjob textures These are additional txd files which have the same name like the dff model and its basic txd with an additional number slamvan.dff and slamvan.txd as basic model files slamvan1.txd as paintjob 0, slamvan2.txd as paintjob 1, etc... If player leave the spot the car will be released from script and the reading process jumps back into 1.Loop {$CLEO .cs}:TuneP_103A4: name_thread 'TuneP':TuneP_20001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @TuneP_200D6: if 000FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 2491.5 -1667.5 13.35 radius 1.0 1.0 1.0004D: jump_if_false @TuneP_20247: request_model #SLAMVAN06E9: request_car_component #hydralics06E9: request_car_component #NTO_B_S06E9: request_car_component 1115:Load_Model_Check0001: wait 0 msif and0248: model #SLAMVAN available06EA: car_component_available #hydralics06EA: car_component_available #NTO_B_S06EA: car_component_available 1115004D: jump_if_false @Load_Model_Check00A5: [email protected] = create_car #SLAMVAN at 2487.5 -1660.5 13.350175: set_car [email protected] z_angle_to 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected]: [email protected] = add_car_component #hydralics to_car [email protected]: [email protected] = add_car_component 1115 to_car [email protected]: set_car [email protected] color_to 1 106ED: set_car [email protected] paintjob 106EB: release_car_component #hydralics06EB: release_car_component #NTO_B_S06EB: release_car_component 11150249: release_model #SLAMVAN:TuneP_40001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @TuneP_400D6: if 080FF: NOT actor $PLAYER_ACTOR 0 ()near_point_on_foot 2491.5 -1667.5 13.35 radius 2.0 2.0 2.0004D: jump_if_false @TuneP_401C3: remove_references_to_car [email protected] // Like turning a car into any random car0002: jump @TuneP_2 the 3 Nitro item definition of veh_mods.ide 1008, nto_b_l, vehicle, 70, 0 1009, nto_b_s, vehicle, 70, 0 1010, nto_b_tw, vehicle, 70, 0 2xnitro 5xnitro 10xnitro CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now