sirusxxxx Posted August 21, 2009 Share Posted August 21, 2009 (edited) First problem is the "parked car" spawns in the middle of the street instead of the coordinates I have entered. The second problem is I cant get the "parked car" to spawn with the hood open to show the engine off. If anyone knows any solutions or suggestions to cleaning this script up please help thanks! {$CLEO .cs}//-------------MAIN---------------thread 'TUNEP' :TUNEP_11wait 0 if Model.Load(#SLAMVAN)06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_39wait 0 if and Model.Available(#SLAMVAN)06EA: car_component #HYDRALICS available 06EA: car_component #NTO_B_S available 06EA: car_component #FBB_LR_SLV1 available else_jump @TUNEP_39 [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)Car.Angle([email protected]) = 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 06ED: set_car [email protected] paintjob 1 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 0249: release_model #SLAMVANModel.Destroy(#HYDRALICS)Model.Destroy(#NTO_B_S)Model.Destroy(#FBB_LR_SLV1)Model.Destroy(#SLAMVAN)0A93: end_custom_thread Edited August 21, 2009 by sirusxxxx Link to comment Share on other sites More sharing options...
2pacproducer2 Posted August 21, 2009 Share Posted August 21, 2009 First problem is the "parked car" spawns in the middle of the street instead of the coordinates I have entered. Thats because you need to make a check that checks if player is near that coords in radius of like 100.0, if yes, then creates the car. And at the end of the script the same check again, if the player isn't in the coords in radius of 100.0 then car destroy instantly and jump to the beggining of the code. Link to comment Share on other sites More sharing options...
2pacproducer2 Posted August 21, 2009 Share Posted August 21, 2009 And the second problem. You want to spawn a car with hood removed ? You need to create the car at coords of 0.0 0.0 0.0 and the remove the hood, I think its car component 0 , and then put car at the coords you want. Use the opcodes search function to find all the opcodes I mentioned. Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 21, 2009 Author Share Posted August 21, 2009 So to open the hood I just edit the code like this?? {$CLEO .cs} //-------------MAIN--------------- thread 'TUNEP' :TUNEP_11 wait 0 if Model.Load(#SLAMVAN) 06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_39 wait 0 if and Model.Available(#SLAMVAN) 06EA: car_component #HYDRALICS available 06EA: car_component #NTO_B_S available 06EA: car_component #FBB_LR_SLV1 available else_jump @TUNEP_39 [email protected] = Car.Create(#SLAMVAN, 0.0, 0.0, 0.0) Car.Angle([email protected]) =0.0 06E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 06ED: set_car [email protected] paintjob 1 08A6: set_vehicle @0 component 0 rotation_to @1 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 0249: release_model #SLAMVAN Model.Destroy(#HYDRALICS) Model.Destroy(#NTO_B_S) Model.Destroy(#FBB_LR_SLV1) Model.Destroy(#SLAMVAN) [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594) Car.Angle([email protected]) = 180.0 0A93: end_custom_thread Well I will have to figure out the whole player check thing now hehe! Link to comment Share on other sites More sharing options...
james227uk Posted August 21, 2009 Share Posted August 21, 2009 08A6: set_vehicle @0 component 0 rotation_to @1 That will crash. Firstly, the @ is on the wrong side of the number. It will try to get vehicle @1 but there's no car. Just a label. Even corrected: 08A6: set_vehicle [email protected] component 0 rotation_to [email protected] Will crash because your setting the rotation to a defined car part. Crash. 0689: set_car CAR remove_componentA 0 visible_effect_flag 0 I think that's what you need, but I don't know. I've never needed/used this opcode before. (There's a B vesion of that opcode too) Link to comment Share on other sites More sharing options...
OrionSR Posted August 21, 2009 Share Posted August 21, 2009 If you want the hood raised on your vehicle then try this code from the Burning Desire mission. 0657: car [email protected] open_componentA 0 Link to comment Share on other sites More sharing options...
ZAZ Posted August 21, 2009 Share Posted August 21, 2009 If you want the hood raised on your vehicle then try this code from the Burning Desire mission. 0657: car [email protected] open_componentA 0 Do you know how to shatter the windscreen in peaces? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 21, 2009 Author Share Posted August 21, 2009 (edited) JAMES AND ORION Thanks Ill try those opcodes to open the hood, I will also have this one to try as well: 067F: car @0 open_car_component 2 ZAZ Try this code but I dont remeber the windsheild component number though 0689: car @1 break_car_component 2 1 (As seen in "Stowaway") Edited August 21, 2009 by sirusxxxx Link to comment Share on other sites More sharing options...
OrionSR Posted August 21, 2009 Share Posted August 21, 2009 Do you know how to shatter the windscreen in peaces? Um... Maybe; 0730: damage_car @0 component 10 See: http://www.gtaforums.com/index.php?showtop...dpost&p=3405061 and: http://www.gtaforums.com/index.php?showtop...dpost&p=4495601 Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 21, 2009 Author Share Posted August 21, 2009 (edited) Okay I am working on the first problem and added a check can someone tell me if I put the destory models in the right place before the jump loop or are they suppose to go somewhere else? Now I got a new problem: When I enter the car and drive away one or two cars spawn immediately before I even get a chance to leave the spawn coordinates area, how do I fix this? So maybe the car waits for a few minutes before spawning or doesnt spawn again until I drive away? Once I am done this I can work on the second problem Edited August 21, 2009 by sirusxxxx Link to comment Share on other sites More sharing options...
OrionSR Posted August 21, 2009 Share Posted August 21, 2009 (edited) Try opcode 00EC:, which doesn't care if CJ is on foot or in a vehicle. Added: Opcodes 00FE: and 80FF: don't appear to match the descriptions in your script. Edited August 21, 2009 by OrionSR Link to comment Share on other sites More sharing options...
james227uk Posted August 21, 2009 Share Posted August 21, 2009 Before the jump at the end of the script, add wait 60000 Change it to what you like. 1000 = 1 second Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 21, 2009 Author Share Posted August 21, 2009 (edited) OrionSR Okay thanks once I found the correct opcodes for those two that were wrong it finally spawns without having to change the wait time Now to work on the car components Edited August 21, 2009 by sirusxxxx Link to comment Share on other sites More sharing options...
Deji Posted August 22, 2009 Share Posted August 22, 2009 Seeing as there's alot of questiosn for these things here, I'll add mine. Now, I know there is no opcode for this (not that I know of, anyway) but does anyone know a way to repair a car component that has been damaged? Like, a specific one. Not all of the car. I want to repair the headlights, in which I've broken. I've tried these: 068A: set_car $RYDER_CAR repair_componentA 20698: set_car [email protected] repair_componentB 4 But they don't seem to work... Or maybe I haven't found the right parameter for the headlights yet (I tried a few). Some sort of memory adress, maybe? Anyone who can help with this gets ma respect and cookies Been driving me mad. Link to comment Share on other sites More sharing options...
james227uk Posted August 25, 2009 Share Posted August 25, 2009 Here's the solution: Make a new topic This topic is for sirusxxxx's problems, not yours. Link to comment Share on other sites More sharing options...
Deji Posted August 26, 2009 Share Posted August 26, 2009 Here's the solution: Make a new topic This topic is for sirusxxxx's problems, not yours. Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. Link to comment Share on other sites More sharing options...
OrionSR Posted August 26, 2009 Share Posted August 26, 2009 So what is the solution? I wasn't having much luck. Did you happen to make a list of which parts were associated with the numbers of the various opcodes? Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 26, 2009 Author Share Posted August 26, 2009 james227uk Thread Jacking Isnt Cool Because Now I Have No Idea What Everyone Is Talking About OrionSR Do you mean which opcodes I corrected in my script or do you mean the opcodes for opening car components? Link to comment Share on other sites More sharing options...
Deji Posted August 26, 2009 Share Posted August 26, 2009 So what is the solution? I wasn't having much luck. Did you happen to make a list of which parts were associated with the numbers of the various opcodes? There's no opcode. Just use a memory address 03C0: [email protected] = actor $PLAYER_ACTOR car0A97: [email protected] = car [email protected] [email protected] += 0x5A00AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 1 0 // broken front left headlight.0AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 1 1 // broken front right headlight. And to fix em again: 0AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 0 1 // fix front right headlight.0AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 0 0 // fix front left headlight Second pop parameter is the status of the headlight. Third pop parameter is the actual headlight. 1 is the right one, 0 is the left one @sirus - think he was talking to me... I also think the info I posted answers your last question? Link to comment Share on other sites More sharing options...
james227uk Posted August 27, 2009 Share Posted August 27, 2009 (edited) Here's the solution: Make a new topic This topic is for sirusxxxx's problems, not yours. Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. No, this place isn't called a "comunity" it's called a Community. Besides, I didn't see ZAZ ask a question. Even If I did, ZAZ very rarely asks questions anyway. No problem with that. @Sirusxxx Have you not a brain? If you had any intelligence you would see I was talking to Deji, I wasn't even talking to you so If you don't understand then get over it. Edited August 27, 2009 by james227uk Link to comment Share on other sites More sharing options...
ZAZ Posted August 29, 2009 Share Posted August 29, 2009 First problem is the "parked car" spawns in the middle of the street instead of the coordinates I have entered. The second problem is I cant get the "parked car" to spawn with the hood open to show the engine off. If anyone knows any solutions or suggestions to cleaning this script up please help thanks! {$CLEO .cs}//-------------MAIN---------------thread 'TUNEP' :TUNEP_11wait 0 if Model.Load(#SLAMVAN)06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_39wait 0 if and Model.Available(#SLAMVAN)06EA: car_component #HYDRALICS available 06EA: car_component #NTO_B_S available 06EA: car_component #FBB_LR_SLV1 available else_jump @TUNEP_39 [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)Car.Angle([email protected]) = 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 06ED: set_car [email protected] paintjob 1 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 0249: release_model #SLAMVANModel.Destroy(#HYDRALICS)Model.Destroy(#NTO_B_S)Model.Destroy(#FBB_LR_SLV1)Model.Destroy(#SLAMVAN)0A93: end_custom_thread Don't spawn the car immediately by gameload. Beginn your script allways with a Loop in defaulft state including a check to activate the mod action. So your car should spawn if the player is near the render area, maybe 80.0 till 100.0 units if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 80.0 80.0 50.0 jf @TUNEP_11 Now I got a new problem:When I enter the car and drive away one or two cars spawn immediately before I even get a chance to leave the spawn coordinates area, how do I fix this? So maybe the car waits for a few minutes before spawning or doesnt spawn again until I drive away? After player arrived at that place and the car appeared should the code run again in a Loop to check if the player left the spawn area. This area check should have a bigger radius and you should use opcode 00FE which checks the location visit in every case instead of opcode 00FF, which checks only if player is on foot or 00EE which checks only if player is in a vehicle. Negation- (opposite) -version of opcodes are done by changing the first ciro into eight 00FE: -> 80FE: and using the not keyword if 80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 90.0 90.0 90.0 jf @TUNEP_253 Use 0657: to open the hood 0657: car [email protected] open_componentA 0 can someone tell me if I put the destory models in the right place before the jump loop or are they suppose to go somewhere else? At first you must understand the difference between Model.Destroy(#SLAMVAN) and Car.Destroy([email protected]) or Car.RemoveReferences([email protected]) In the script variation with writing opcodes is it more clear difference between 0249: release_model #SLAMVAN and 00A6: destroy_car [email protected] or 01C3: remove_references_to_car [email protected] The Model.Destroy or opcode 0249: frees the engine or memory from the loaded model file which is need to spawn the item. Car.Destroy or opcode 00A6: belongs to the instance of a created vehicle which is allways defined with a variable name. You should release the loaded model file when the item is created and the model file is nevermore needed. You should release the created instance of an item if the script action is finished. Then you can start the script from beginning and can use again the same variable name to create the item again. The equivalent for tuningparts exist only to release the loaded model file. A release of the instance of an attached tuningpart is not necessary. The script: {$CLEO .cs}//-------------MAIN---------------thread 'TUNEP' :TUNEP_11wait 0 if Player.Defined($PLAYER_CHAR)jf @TUNEP_11 if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 80.0 80.0 50.0 jf @TUNEP_11 Model.Load(#SLAMVAN)06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_99wait 0 if and Model.Available(#SLAMVAN)06EA: car_component #HYDRALICS available 06EA: car_component #NTO_B_S available 06EA: car_component #FBB_LR_SLV1 available jf @TUNEP_99 [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)Car.Angle([email protected]) = 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 0209: [email protected] = random_int_in_ranges 0 2 06ED: set_car [email protected] paintjob [email protected] 0657: car [email protected] open_componentA 0 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 Model.Destroy(#SLAMVAN):TUNEP_253wait 0 if Player.Defined($PLAYER_CHAR)jf @TUNEP_253 if 80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 90.0 90.0 90.0 jf @TUNEP_253 Car.RemoveReferences([email protected])jump @TUNEP_11 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Kookas Posted August 29, 2009 Share Posted August 29, 2009 Here's the solution: Make a new topic This topic is for sirusxxxx's problems, not yours. Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. No, this place isn't called a "comunity" it's called a Community. Besides, I didn't see ZAZ ask a question. Even If I did, ZAZ very rarely asks questions anyway. No problem with that. @Sirusxxx Have you not a brain? If you had any intelligence you would see I was talking to Deji, I wasn't even talking to you so If you don't understand then get over it. You know, there is no reason for you to be so damn rude and in everyone's face like you're something special. Sometimes things aren't obvious, even if you think they are. Link to comment Share on other sites More sharing options...
ZAZ Posted August 29, 2009 Share Posted August 29, 2009 Here's the solution: Make a new topic This topic is for sirusxxxx's problems, not yours. Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. No, this place isn't called a "comunity" it's called a Community. Besides, I didn't see ZAZ ask a question. Even If I did, ZAZ very rarely asks questions anyway. No problem with that. @Sirusxxx Have you not a brain? If you had any intelligence you would see I was talking to Deji, I wasn't even talking to you so If you don't understand then get over it. You know, there is no reason for you to be so damn rude and in everyone's face like you're something special. Sometimes things aren't obvious, even if you think they are. This is Sirusxxx's topic and you should send james227uk a pm for that message I wish me that Dutchy delete our two posts CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
sirusxxxx Posted August 30, 2009 Author Share Posted August 30, 2009 (edited) ZAZ Sorry I should of posted my edited script I already changed most of what you mentioned except I didnt know about the destroy components and models part, so I must thank you for this. Anyways here is a movie of the script I made for the Dillimore's Tuning Shop, I still have some work to do like have them only spawn durning a specific time at night, instead of all the time so any help would be great! Edited August 31, 2009 by sirusxxxx Link to comment Share on other sites More sharing options...
ZAZ Posted August 30, 2009 Share Posted August 30, 2009 ZAZ Sorry I should of posted my edited script I already changed most of what you mentioned except I didnt know about the destroy components and models part, so I must thank you for this. Anyways here is a movie of the script I made for the Dillimore's Tuning Shop, I still have some work to do like have them only spawn durning a specific time at night, instead of all the time so any help would be great! VIDEO OF MY SCRIPT Don't know if the user is happy when he must come to another time. Alternative you could make a fade and change the time when he enters the spot. Look in CLEO Script Tutorial--->Give access with math coding for the theme: Time check for game hours Btw. nice vid 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