Ify24 Posted September 10, 2011 Share Posted September 10, 2011 Hy guys... I have a question... How to make that every car in $x $y $z ( random car, player's car... any car ) stop, then wait 5000 ( 5 sec ) and then move on ??? pls help... Link to comment Share on other sites More sharing options...
aStiffSausage Posted September 10, 2011 Share Posted September 10, 2011 Something like this? :LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2000.0 3000.0 cornerB 2000.5 3000.5 if056E: car [email protected] defined else_jump @LOOP04BA: set_car [email protected] speed_to 0.0 wait 5000 ms01C3: remove_references_to_car [email protected] // Like turning a car into any random car Just change the coordinates on first opcode. Link to comment Share on other sites More sharing options...
Swoorup Posted September 10, 2011 Share Posted September 10, 2011 you mean the AI vehicle paths? Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 Something like this? :LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2000.0 3000.0 cornerB 2000.5 3000.5 if056E: car [email protected] defined else_jump @LOOP04BA: set_car [email protected] speed_to 0.0 wait 5000 ms01C3: remove_references_to_car [email protected] // Like turning a car into any random car Just change the coordinates on first opcode. Yeah but when I load my game it shows dark scren and I needed to log off to exit gta:sa with this script : {$CLEO .cs}thread "CARSTOP"0A95: enable_thread_saving:LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA -2644.6384 1172.892 cornerB -2644.7 1172.9if056E: car [email protected] definedelse_jump @LOOP04BA: set_car [email protected] speed_to 0.0wait 5000 ms01C3: remove_references_to_car [email protected] 0A95: enable_thread_saving Anyone can help ? Link to comment Share on other sites More sharing options...
DaRk_St0rM Posted September 10, 2011 Share Posted September 10, 2011 Why did you enabled thread saving twice? EDIT: I think the best way would be a path, don't you? Link to comment Share on other sites More sharing options...
aStiffSausage Posted September 10, 2011 Share Posted September 10, 2011 That was just an example... How about adding there "wait" and check to see if player is defined? Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 Why did you enabled thread saving twice? EDIT: I think the best way would be a path, don't you? ThO I didn't notice that... hah.. Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 That was just an example... How about adding there "wait" and check to see if player is defined? IDK I never really used 0327: opcode before... did I made a mistake at cornerA and cornerB.... what it means ?? Link to comment Share on other sites More sharing options...
aStiffSausage Posted September 10, 2011 Share Posted September 10, 2011 CornerA - Defines one corner of the area CornerB - Defines second corner of the area And the area between those will be selected. {$CLEO .cs}thread "CARSTOP"0A95: enable_thread_saving:LOOPwait 0 msif0256: player $PLAYER_CHAR defined else_jump @LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA -2644.6384 1172.892 cornerB -2644.7 1172.9if056E: car [email protected] definedelse_jump @LOOP04BA: set_car [email protected] speed_to 0.0wait 5000 ms01C3: remove_references_to_car [email protected] jump @LOOP Maybe that one will work. You might need to use some more effective way to stop the cars. Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 When I get to the position car didn't stop... I want they to stop like in Golden Gate : http://ch-slike.com/?v=cbTM4.png pls help... Link to comment Share on other sites More sharing options...
BnB Posted September 11, 2011 Share Posted September 11, 2011 Don't use 0A95: in every script unless it's necessary. Link to comment Share on other sites More sharing options...
Ify24 Posted September 11, 2011 Author Share Posted September 11, 2011 (edited) But I dont think that will fix something... {$CLEO .cs}thread "CARSTOP":LOOPwait 0 msif0256: player $PLAYER_CHAR definedelse_jump @LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2478.2087 -1734.4667 cornerB 2478.3087 -1734.5667 if056E: car [email protected] definedelse_jump @LOOP04BA: set_car [email protected] speed_to 0.0wait 5000 ms01C3: remove_references_to_car [email protected] @LOOP They don't stop... Pls help... EDIT: Hey guys I know ! Maybe I can edit that random car stop when the traffic light is red... but I can't find script ... Maybe I can edit that script .... Anyone help pls.... Edited September 11, 2011 by Ify24 Link to comment Share on other sites More sharing options...
Ify24 Posted September 11, 2011 Author Share Posted September 11, 2011 Pls guys... masters help pls ! anyone ? Link to comment Share on other sites More sharing options...
Adler Posted September 11, 2011 Share Posted September 11, 2011 Don't bump a topic only after 3 hours. -_- Link to comment Share on other sites More sharing options...
Ify24 Posted September 12, 2011 Author Share Posted September 12, 2011 But I need help... Link to comment Share on other sites More sharing options...
Panlantix Posted September 13, 2011 Share Posted September 13, 2011 Try changing else_jump @LOOP to jf @LOOP. Here's what I do when I have a problem with a script, I use opcode 00BC to print out something to the screen, make it wait a second, and then go on with the script. What this does is it tells you where it is in the code at all times and if you record the messages it gives you, you can see the exact path that the code is taking. :LOOP00BC: show_text_highpriority GXT 'InLoop' time 5000 flag 0wait 10000327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2000.0 3000.0 cornerB 2000.5 3000.5 00BC: show_text_highpriority GXT 'MadeCr' time 5000 flag 0wait 1000if056E: car [email protected] defined else_jump @LOOP00BC: show_text_highpriority GXT 'MadeCar' time 5000 flag 0wait 100004BA: set_car [email protected] speed_to 0.0 00BC: show_text_highpriority GXT 'SetSpd' time 5000 flag 0wait 1000wait 5000 ms00BC: show_text_highpriority GXT 'WaitOvr' time 5000 flag 0wait 100001C3: remove_references_to_car [email protected] // Like turning a car into any random car00BC: show_text_highpriority GXT 'RemRef' time 5000 flag 0wait 1000 Start the game with this code in place, and record each message as it shows up. I know this particular opcode is probably not the best to use because in practice it's giving you the info because of an error in itself, but it works for what it needs to do. Also, try changing wait 5000 ms to wait 5000. I have never had to add the 'ms' at the end for the game to wait. And let us know what debug code tells you when you start the game. You can get rid of 'missing', which will show up at the end. Link to comment Share on other sites More sharing options...
BnB Posted September 13, 2011 Share Posted September 13, 2011 Try changing else_jump @LOOP to jf @LOOP. Also, try changing wait 5000 ms to wait 5000. It's the SAME thing. Link to comment Share on other sites More sharing options...
Ify24 Posted September 13, 2011 Author Share Posted September 13, 2011 Oh come on guys..I am sure that people like ZAZ, PatrickW, Dutchy and some other great coders can help me with this...Please.... Link to comment Share on other sites More sharing options...
Ify24 Posted September 14, 2011 Author Share Posted September 14, 2011 Hey is a car stop included in car path ??? Like when it's a traffic light car stops but is this in .scm or in path ? Link to comment Share on other sites More sharing options...
DaRk_St0rM Posted September 14, 2011 Share Posted September 14, 2011 Paths do what you have recorded and then stops. Try to search for that in scm.. EDIT: Anyway, you could post it in the request topic, and maybe someone will help you. Link to comment Share on other sites More sharing options...
Ify24 Posted September 15, 2011 Author Share Posted September 15, 2011 Paths do what you have recorded and then stops. Try to search for that in scm.. EDIT: Anyway, you could post it in the request topic, and maybe someone will help you. Yeah, I already search in main.scm ... 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