Yazor_Qunt Posted August 14, 2020 Share Posted August 14, 2020 (edited) I'm new, and I don't know much about coding, but I'm starting a mod inspired by this: https://gtaforums.com/topic/917353-sa-homies-extended-control/ I am looking to make a guard / helper mod. My problem is that I want it to attack peds in a radius / sphere of 50, but I can't find how to identify each ped within this range. Can anybody help me? Edited August 14, 2020 by Yazor_Qunt Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/ Share on other sites More sharing options...
In45do Posted August 15, 2020 Share Posted August 15, 2020 // Let say you have 0@ as the guard actor, the code would look like this: :Get_Actor wait 0 04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0 0AE1: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 50.0 find_next 1 pass_deads 1 if 056D: actor 4@ defined jf @Get_Actor 05E2: AS_actor 0@ kill_actor 4@ // Loop somewhere else Yazor_Qunt 1 Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071315623 Share on other sites More sharing options...
Yazor_Qunt Posted August 16, 2020 Author Share Posted August 16, 2020 (edited) Hace 19 horas, In45do dijo: // Let say you have 0@ as the guard actor, the code would look like this: :Get_Actor wait 0 04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0 0AE1: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 50.0 find_next 1 pass_deads 1 if 056D: actor 4@ defined jf @Get_Actor 05E2: AS_actor 0@ kill_actor 4@ // Loop somewhere else Thanks for your prompt reply, but I have doubts about what "1@ 2@ 3@ 4@" represents in: 04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0 0AE1: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 50.0 find_next 1 pass_deads 1 Thank you for your patience. Edited August 16, 2020 by Yazor_Qunt Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071316327 Share on other sites More sharing options...
In45do Posted August 16, 2020 Share Posted August 16, 2020 04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0 04C4 is an opcode which stores coordinates from an actor within their offsets 1@ = X position from an actor (left, right) 2@ = Y position from an actor (front, back) 3@ = Z position from an actor (up, down) 0@ = the actor 0AE1: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 50.0 find_next 1 pass_deads 1 0AE1 is an opcode which stores a random actor within area, with custom radius, skip certain actor, and skip dead actor 4@ = the random actor 1@ = X position from a point 2@ = Y position from a point 3@ = Z position from a point You can learn more of these stuff from here Yazor_Qunt 1 Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071316514 Share on other sites More sharing options...
Yazor_Qunt Posted August 22, 2020 Author Share Posted August 22, 2020 On 8/16/2020 at 3:40 AM, In45do said: 04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0 04C4 es un código de operación que almacena coordenadas de un actor dentro de sus desplazamientos 1o X posición desde un actor (izquierda, derecha) 2o Posición Y desde un actor (delantero, trasero) Posición Z de 3o desde un actor (arriba, abajo) 0o el actor 0AE1: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 50.0 find_next 1 pass_deads 1 0AE1 es un código de operación que almacena un actor aleatorio dentro del área, con radio personalizado, omitir cierto actor y saltar el actor muerto 4o el actor al azar 1o X posición desde un punto 2o Posición Y desde un punto Posición Z de 3o desde un punto Puedes aprender más de estas cosas desde aquí Very good tutorial, I have been doing some research. I have used this OpCode but can't think of how it could handle deactivation. Any recommendation? Thanks again Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071321926 Share on other sites More sharing options...
ZAZ Posted August 22, 2020 Share Posted August 22, 2020 please post your script Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071322041 Share on other sites More sharing options...
Kucing.Bertelur Posted August 31, 2020 Share Posted August 31, 2020 On 8/22/2020 at 1:33 PM, ZAZ said: please post your script Hi zaz, you can help about XOR For GTA SA Android?? RyanDri3957V 1 Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071329611 Share on other sites More sharing options...
XMDS Posted August 31, 2020 Share Posted August 31, 2020 2 hours ago, Kucing.Bertelur said: Hi zaz, you can help about XOR For GTA SA Android?? You can write ARM assembly code in CLEO to realize the function of XOR operation. Then call this function with 0DD2. Or complete the XOR operation directly in the assembly code. If you only consider the simplicity of the code, you can implement the XOR operation through ordinary calculation OP. But I will not provide any sample code to help you. Because before I published the source code for reading and writing Android CLEO configuration ini files, those authors chose to encrypt CLEO. This is not conducive to learning CLEO, so I will not provide any Android cleo code. Unless it's a good friend. Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071329679 Share on other sites More sharing options...
Kucing.Bertelur Posted September 1, 2020 Share Posted September 1, 2020 12 hours ago, China·XMDS said: You can write ARM assembly code in CLEO to realize the function of XOR operation. Then call this function with 0DD2. Or complete the XOR operation directly in the assembly code. If you only consider the simplicity of the code, you can implement the XOR operation through ordinary calculation OP. But I will not provide any sample code to help you. Because before I published the source code for reading and writing Android CLEO configuration ini files, those authors chose to encrypt CLEO. This is not conducive to learning CLEO, so I will not provide any Android cleo code. Unless it's a good friend. Does the Code Set Bit and Test Bit as an Alternative XOR? Please help friends, I am from Indonesia and not stealer. You can see MOD MADE ITU IN YOUTUTY CHANNEL: Muhammad Zauqie and GTainside: MZFS99, MZAUQIEFS. My elephant friend lay eggs. Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071330265 Share on other sites More sharing options...
XMDS Posted September 1, 2020 Share Posted September 1, 2020 2 minutes ago, Kucing.Bertelur said: Does the Code Set Bit and Test Bit as an Alternative XOR? Please help friends, I am from Indonesia and not stealer. You can see MOD MADE ITU IN YOUTUTY CHANNEL: Muhammad Zauqie and GTainside: MZFS99, MZAUQIEFS. My elephant friend lay eggs. You should create a new theme. Instead of continuing under the subject. Perhaps the question about Android CLEO can have a general theme. Then we should continue on that topic. @OrionSR https://gtaforums.com/topic/926144-gta-sa-android-scm-write-memory-address-value/ Here is a very good topic on Android cleo. You should create a similar theme. Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071330273 Share on other sites More sharing options...
Kucing.Bertelur Posted September 1, 2020 Share Posted September 1, 2020 7 hours ago, XMDS said: You should create a new theme. Instead of continuing under the subject. Perhaps the question about Android CLEO can have a general theme. Then we should continue on that topic. @OrionSR https://gtaforums.com/topic/926144-gta-sa-android-scm-write-memory-address-value/ Here is a very good topic on Android cleo. You should create a similar theme. Okey bro, btw you can create cvector used memory in android ? I'am try create cvector used metode you but not working bro -_- Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071330451 Share on other sites More sharing options...
XMDS Posted September 2, 2020 Share Posted September 2, 2020 22 hours ago, Kucing.Bertelur said: Okey bro, btw you can create cvector used memory in android ? I'am try create cvector used metode you but not working bro -_- CVetcor is just a structure of XYZ coordinates. It is actually a pointer. You can write data into cleo's static space, and then use 0DD0 to get the address of the static memory space. Ok. I have already written the code to use XOR operation on Android. Do you need it? You can create new themes if needed. I can upload the code. Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071331219 Share on other sites More sharing options...
Kucing.Bertelur Posted September 2, 2020 Share Posted September 2, 2020 5 hours ago, XMDS said: CVetcor is just a structure of XYZ coordinates. It is actually a pointer. You can write data into cleo's static space, and then use 0DD0 to get the address of the static memory space. Ok. I have already written the code to use XOR operation on Android. Do you need it? You can create new themes if needed. I can upload the code. yes I want XOR for Android bro, are the results of the XYZ Actor saved to pointer memory to become a vector? 5 hours ago, XMDS said: CVetcor is just a structure of XYZ coordinates. It is actually a pointer. You can write data into cleo's static space, and then use 0DD0 to get the address of the static memory space. Ok. I have already written the code to use XOR operation on Android. Do you need it? You can create new themes if needed. I can upload the code. Check message Link to comment https://gtaforums.com/topic/960101-how-can-i-define-an-actor-inside-the-radius-sphere/#findComment-1071331421 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