Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ped vermoorden

Hoi allemaal,

Ik ben met een nieuwe cleo mod bezig, maar ik loop vast. Ik weet niet hoe ik een ped moet vermoorden die in een sphere van 5.0 staat om CJ heen. Ik wil graag dat als de speler op 'P' drukt (0AB0: key_pressed 80 // P) dat dan alle actors binnen een straal van 5.0 komen te overlijden.

Ik heb geen idee hoe ik dit moet aanpakken. Ik heb al een aantal dingen geprobeerd.

:Begin
1@ = Actor.Create(CivMale, #MALE01, 0.0, 0.0, 0.0)
wait 0
04C4: store_coords_to $X $Y $Z from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
if
00FF:   actor 1@ sphere 0 in_sphere $X $Y $Z radius 5.0 5.0 5.0 on_foot
jf @Begin
Actor.Health(1@) = 0
jump @Begin 

:Begin
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
08E5: get_actor_in_sphere 1@ 2@ 3@ radius 5.0 handle_as 6@
wait 0
if
00FE:   actor 6@ sphere 0 in_sphere 1@ 2@ 3@ radius 5.0 5.0 5.0
jf @Begin
0223: set_actor 6@ health_to 0
jump @Begin

:Begin
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 10@ closest_ped_to 0@
wait 0
if
00FE:   actor 0@ sphere 0 in_sphere 1@ 2@ 3@ radius 5.0 5.0 5.0
jf @Begin
0223: set_actor 0@ health_to 0
jump @Begin

Ik snap niet wat ik moet doen. :N Weet iemand anders het?

Alvast bedankt,

Bierbuikje

Featured Replies

Dit gaat als volgt :)

:START
00A0: store_actor $PLAYER_ACTOR position_to $COORD_X $COORD_Y $COORD_Z
089E: get_actor_in_sphere $COORD_X $COORD_Y $COORD_Z radius 5.0 handle_as $ACTOR_TO_BE_KILLED // versionB 
0321: kill_actor $ACTOR_TO_BE_KILLED 
jump @START

  • Author

{$CLEO .CS}

:1
jump @P

:P
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @P
if
0AB0: key_pressed 80 // P
jf @P
jump @START

:START
00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
089E: get_actor_in_sphere 1@ 2@ 3@ radius 5.0 handle_as 0@ // versionB
0223: set_actor 0@ health_to 0
jump @P

0A93: end_custom_thread

Als ik nu op 'P' druk crasht het spel terwijl ik letterlijk tegen een ped aan sta. Weet iemand waar het aan ligt?

Ik heb jouw script eens geprobeerd, je moet een wait toevoegen in de if waar gecontroleerd wordt of je de P indrukt.

PS: Je moet ook nog een beveiliging inbouwen, als er namelijk geen ped in een straal van 5 is en je drukt P crasht het spel. Een aanpassing hierop weet ik niet.

Heb snel een scriptje gemaakt en getest en het werkt:

{$VERSION 3.1.0027}
 {$CLEO .CS}

 0A92: create_custom_thread "KILLACTOR"

 :KILLACTOR_01
 wait 0
 if and
Player.Defined($PLAYER_CHAR)
 0AB0:  key_pressed 80
 else_jump @KILLACTOR_01
 wait 100
 00A0: store_actor $PLAYER_ACTOR position_to $COORD_X $COORD_Y $COORD_Z

 :KILLACTOR_02
 08E5: get_actor_in_sphere $COORD_X $COORD_Y $COORD_Z radius 10.0 handle_as $ACTOR_1 
 wait 10
 if not $ACTOR_1 == -1
 else_jump @KILLACTOR_01
 0321: kill_actor $ACTOR_1
 jump @KILLACTOR_02
 0A93: end_custom_thread

de "beveiliging" zit er al ingebouwd...

Edited by BC7

  • Author

Ik heb de onderstaande regel nooit gesnapt.

if not $ACTOR_1 == -1

Maar het checkt dus gewoon of de actor er ook echt is?

Bedankt Tom, donald en BC7. _O_

if not $ACTOR_1 == -1

als iets er niet is dan is de "handle" -1, dus niets.

Dus als $ACTOR_1 -1 is dan keert ie weer terug naar het begin ;)

Trouwens, ben ff de opcode kwijt om een deur van een auto los te zetten.

in dit geval de kofferbak, Weet iemand die?

  • Author
if not $ACTOR_1 == -1

als iets er niet is dan is de "handle" -1, dus niets.

Dus als $ACTOR_1 -1 is dan keert ie weer terug naar het begin ;)

Trouwens, ben ff de opcode kwijt om een deur van een auto los te zetten.

in dit geval de kofferbak, Weet iemand die?

04E1: open_and_freeze_car_trunk 524@ ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.