|
 |
|
|
|
|
|
Attention:
|
The Mod Showroom is only for posting previews/downloads of completed or near finished mods. All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
|
|
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials
|
CLEO3 MODS a sampler of my favorites scripts
 |
|
 |
| |
ZAZ  |
Posted: Saturday, Nov 26 2011, 10:57
|
Kernlochbohrer

Group: Members
Joined: Jan 10, 2005



|
| QUOTE (methodunderg @ Saturday, Nov 26 2011, 07:50) | | QUOTE (ZAZ @ Monday, Apr 18 2011, 18:46) | First script blows up the nearest car of CJ. This can also be an allready wrecked car.
| CODE | {$CLEO .cs} :GETNearCar_0 03A4: name_thread 'GETNCAR' 0@ = -1
:GETNearCar_11 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @GETNearCar_11 if 0AB0: key_pressed 8//-----------------------------press backspace 004D: jump_if_false @GETNearCar_11 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@ if 8039: not 0@ == -1 // integer values 004D: jump_if_false @GETNearCar_11 020B: explode_car 0@ // versionA 01C3: remove_references_to_car 0@ wait 500 0@ = -1 jump @GETNearCar_11 |
|
Hey ZAZ; finally got round to testing this mod ..
Only problem I have with this one, is that if you are in a car, the nearest car to the player is the one that you are in And you instantly die if you press 'backspace' Can you fix this issue?
I guess just make a check to see if player is in a vehicle or not, and get the nearest vehicle to that vehicle? | | CODE | {$CLEO .cs} :GETNearCar_0 03A4: name_thread 'GETNCAR' 0@ = -1
:GETNearCar_11 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @GETNearCar_11 if 80DF: not actor $PLAYER_ACTOR driving 004D: jump_if_false @GETNearCar_12 if 0AB0: key_pressed 8//-----------------------------press backspace 004D: jump_if_false @GETNearCar_11 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@ if 8039: not 0@ == -1 // integer values 004D: jump_if_false @GETNearCar_11 020B: explode_car 0@ // versionA 01C3: remove_references_to_car 0@ wait 500 0@ = -1 jump @GETNearCar_11
:GETNearCar_12 03C0: 5@ = actor $PLAYER_ACTOR car
:GETNearCar_13 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @GETNearCar_13 if 00DF: actor $PLAYER_ACTOR driving 004D: jump_if_false @GETNearCar_11 if 0AB0: key_pressed 8//-----------------------------press backspace 004D: jump_if_false @GETNearCar_13 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@ if 8039: not 0@ == -1 // integer values 004D: jump_if_false @GETNearCar_13 if 803B: not 0@ == 5@ // (int) 004D: jump_if_false @GETNearCar_13 020B: explode_car 0@ // versionA 01C3: remove_references_to_car 0@ wait 500 0@ = -1 jump @GETNearCar_13 |
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
ZAZ  |
|
Kernlochbohrer

Group: Members
Joined: Jan 10, 2005



|
| QUOTE (methodunderg @ Saturday, Nov 26 2011, 21:46) | | Thanks for trying ZAZ. But now no car explodes when I'm in a car .. |
Yes, i know get_random_car scripts are more complicate and dificult to understand for non-coders i will explain: as you can see, the opcode 0AB5: can only do the job if CJ doesn't drive any vehicle another way would be a cleo4 opcode as SilentPL mentoined but let's stay at cleo3 so another opcode can be 053E: 0@ = get_random_car_with_actors -1 in_area 1@ 2@ 11@ 12@ with this, in praxis, it happens that the game often get the same car again , also if it is wrecked the only way to fix would be to remove the wrecked car complete from game, which means thet the wrecked cars diappear imediately one more method is a strange method to get every ped or actor and check if he drives a vehicle so it can only get cars with driver you must decide: cleo4 code or wrecked cars diappear imediately or only get cars with driver I made a script by method 3, only get cars with driver | CODE | {$CLEO .cs} :BLOW_UP_NEAREST_CAR 03A4: name_thread 'NCAREXP'
:NCAREXP_11 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @NCAREXP_11 00D6: if 0AB0: key_pressed 8//-----------------------------press backspace //0AB0: key_pressed 66// b key 004D: jump_if_false @NCAREXP_11 0006: 0@ = -1 0006: 1@ = -1 0006: 2@ = -1 0006: 3@ = -1 0006: 4@ = -1 0006: 5@ = -1 0006: 6@ = -1 0006: 7@ = -1 0006: 8@ = -1 0006: 9@ = -1 0006: 10@ = -1 0006: 11@ = -1 0006: 12@ = -1 0006: 13@ = -1 0006: 14@ = -1 0006: 15@ = -1 0006: 16@ = -1 0006: 17@ = -1 0006: 18@ = -1 0006: 19@ = -1 0006: 20@ = -1 0006: 21@ = -1 0006: 22@ = -1 0006: 23@ = -1 0006: 24@ = 0 0050: gosub @NCAREXP_275 00D6: if 0039: 23@ == -1 004D: jump_if_false @NCAREXP_257 0001: wait 0 ms 0050: gosub @NCAREXP_558
:NCAREXP_257 0001: wait 0 ms 0050: gosub @NCAREXP_1364 0002: jump @NCAREXP_11
:NCAREXP_275 0006: 31@ = 0 0006: 27@ = 0
:NCAREXP_289 0085: 30@ = 31@ // (int) 0006: 29@ = 0
:NCAREXP_304 00D6: if and 056D: actor 30@ defined 803C: not $PLAYER_ACTOR == 30@ // (int) 004D: jump_if_false @NCAREXP_485 0085: 0@(27@,32i) = 30@ // (int) 00D6: if 8118: not actor 30@ dead 004D: jump_if_false @NCAREXP_471 00D6: if 00DF: actor 30@ driving 004D: jump_if_false @NCAREXP_471 00A0: store_actor 30@ position_to 25@ 26@ 28@ 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 12.0 12.0 12.0 004D: jump_if_false @NCAREXP_471 03C0: 23@ = actor 30@ car 00D6: if 8119: not car 23@ wrecked 004D: jump_if_false @NCAREXP_471 020B: explode_car 23@ // versionA 0085: 24@ = 27@ // (int) 0051: return
:NCAREXP_471 000A: 27@ += 1 0002: jump @NCAREXP_513
:NCAREXP_485 000A: 30@ += 1 000A: 29@ += 1 0019: 29@ > 127 004D: jump_if_false @NCAREXP_304
:NCAREXP_513 000A: 31@ += 256 00D6: if or 0019: 27@ > 21 0019: 31@ > 35584 004D: jump_if_false @NCAREXP_289 0006: 24@ = 21 0051: return
:NCAREXP_558 0006: 27@ = 0
:NCAREXP_565 0001: wait 0 ms 00D6: if 001D: 24@ > 27@ // (int) 004D: jump_if_false @NCAREXP_759 00D6: if 8039: not 0@(27@,32i) == -1 004D: jump_if_false @NCAREXP_745 00D6: if 8118: not actor 0@(27@,32i) dead 004D: jump_if_false @NCAREXP_745 00D6: if 00DF: actor 0@(27@,32i) driving 004D: jump_if_false @NCAREXP_745 00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@ 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 24.0 24.0 24.0 004D: jump_if_false @NCAREXP_745 03C0: 23@ = actor 0@(27@,32i) car 00D6: if 8119: not car 23@ wrecked 004D: jump_if_false @NCAREXP_745 020B: explode_car 23@ // versionA 0051: return
:NCAREXP_745 000A: 27@ += 1 0002: jump @NCAREXP_565
:NCAREXP_759 0006: 27@ = 0
:NCAREXP_766 0001: wait 0 ms 00D6: if 001D: 24@ > 27@ // (int) 004D: jump_if_false @NCAREXP_960 00D6: if 8039: not 0@(27@,32i) == -1 004D: jump_if_false @NCAREXP_946 00D6: if 8118: not actor 0@(27@,32i) dead 004D: jump_if_false @NCAREXP_946 00D6: if 00DF: actor 0@(27@,32i) driving 004D: jump_if_false @NCAREXP_946 00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@ 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 36.0 36.0 36.0 004D: jump_if_false @NCAREXP_946 03C0: 23@ = actor 0@(27@,32i) car 00D6: if 8119: not car 23@ wrecked 004D: jump_if_false @NCAREXP_946 020B: explode_car 23@ // versionA 0051: return
:NCAREXP_946 000A: 27@ += 1 0002: jump @NCAREXP_766
:NCAREXP_960 0006: 27@ = 0
:NCAREXP_967 0001: wait 0 ms 00D6: if 001D: 24@ > 27@ // (int) 004D: jump_if_false @NCAREXP_1161 00D6: if 8039: not 0@(27@,32i) == -1 004D: jump_if_false @NCAREXP_1147 00D6: if 8118: not actor 0@(27@,32i) dead 004D: jump_if_false @NCAREXP_1147 00D6: if 00DF: actor 0@(27@,32i) driving 004D: jump_if_false @NCAREXP_1147 00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@ 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 50.0 50.0 50.0 004D: jump_if_false @NCAREXP_1147 03C0: 23@ = actor 0@(27@,32i) car 00D6: if 8119: not car 23@ wrecked 004D: jump_if_false @NCAREXP_1147 020B: explode_car 23@ // versionA 0051: return
:NCAREXP_1147 000A: 27@ += 1 0002: jump @NCAREXP_967
:NCAREXP_1161 0006: 27@ = 0
:NCAREXP_1168 0001: wait 0 ms 00D6: if 001D: 24@ > 27@ // (int) 004D: jump_if_false @NCAREXP_1362 00D6: if 8039: not 0@(27@,32i) == -1 004D: jump_if_false @NCAREXP_1348 00D6: if 8118: not actor 0@(27@,32i) dead 004D: jump_if_false @NCAREXP_1348 00D6: if 00DF: actor 0@(27@,32i) driving 004D: jump_if_false @NCAREXP_1348 00A0: store_actor 0@(27@,32i) position_to 25@ 26@ 28@ 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 25@ 26@ 28@ radius 70.0 70.0 70.0 004D: jump_if_false @NCAREXP_1348 03C0: 23@ = actor 0@(27@,32i) car 00D6: if 8119: not car 23@ wrecked 004D: jump_if_false @NCAREXP_1348 020B: explode_car 23@ // versionA 0051: return
:NCAREXP_1348 000A: 27@ += 1 0002: jump @NCAREXP_1168
:NCAREXP_1362 0051: return
:NCAREXP_1364 0006: 27@ = 0
:NCAREXP_1371 0001: wait 0 ms 00D6: if 001D: 24@ > 27@ // (int) 004D: jump_if_false @NCAREXP_1439 00D6: if 8039: not 0@(27@,32i) == -1 004D: jump_if_false @NCAREXP_1425 01C2: remove_references_to_actor 0@(27@,32i) // Like turning an actor into a random pedestrian
:NCAREXP_1425 000A: 27@ += 1 0002: jump @NCAREXP_1371
:NCAREXP_1439 0051: return
|
| QUOTE (SilentPL @ Saturday, Nov 26 2011, 22:15) | | You might try to change 0AB5 $PLAYER_ACTOR param to last found nearest ped in 2nd check (@GETNearCar_13). If it doesn't help, try to mess with that CLEO4 "get_random_car" opcode. |
i tried cleo4 opcode, took the script from previous post and replaced 0AB5: with 00A0: store_actor $PLAYER_ACTOR position_to 11@ 12@ 13@ 0AE2: 0@ = random_vehicle_near_point 11@ 12@ 13@ in_radius 12.0 find_next 0 0// - cleo 4 - it worked but let wrecked cars explode so i changed last param to 1 0AE2: 0@ = random_vehicle_near_point 11@ 12@ 13@ in_radius 12.0 find_next 0 1// - cleo 4 - it worked for 2 trails then it crashed
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
JoWie  |
|
Snitch

Group: Members
Joined: Nov 27, 2008

|
| QUOTE (methodunderg @ Sunday, Jan 15 2012, 03:09) | You could at least provide him with the exact co-ordinates instead of images | thanks for the suggestion. Packer: X: -2052.32690429688 Y: 139.712463378906 Z: 29.4703559875488 Angle: 180.246 Towtruck: X: -2046.955078125 Y: 145.967071533203 Z: 28.7182884216309 Angle: 179.484 Green Sabre: X: 2491.22485351563 Y: -1682.78308105469 Z: 13.075798034668 Angle: 89.467
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(92) « First ... 85 86 [87] 88 89 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|