CLEO Help $actor2 = not $actor1 problem

CLEO related
Status
Not open for further replies.

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
hello , i'm stuck at some point which i have to inform cleo that $target is not $player_actor

so here is the part of the code

04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0   
0AE1: $target = random_actor_near_point 1@ 2@ 3@ in_radius 500.0 find_next 1 pass_deads 1

now i need to stop cleo  from getting $player_actor again and register it to $target

so i need $target to be any nigga near my place instead of me lol

is this code could fix it ?
0B13: 0@ = NOT 0@

i tried it but not working maybe i used it wrong  :me_gusta:
i used it like this
if
0B13: $target = NOT $player_actor
then
... etc
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
springfield link said:
Code:
if $target <> $player_actor
But if you want to use opcodes,
Code:
if 803C: $target == $player_actor


i need to say if not 

so i add the not after the " 803c: "
or i type
if 803c: $target == $player_actor
jump @false
....
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
There are no opcodes starting with '8', 8 in front of an opcode means 'not'
So "003C: not 1@ == 1@" == "803C: 1@ == 1@"
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
springfield link said:
There are no opcodes starting with '8', 8 in front of an opcode means 'not'
So "003C: not 1@ == 1@" == "803C: 1@ == 1@"
oh , that is new lol

btw why we don't just type " = "  why " == "

and is there way of not equal like in vb is != ,, in cleo there is just not statement?
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
springfield link said:
<> it's the same as !=
You can use <> in vb too, i think.
i used to use != , so idk about <> xD anyway i will pm you with the damn code idk why it's not working lol
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
springfield link said:
No need to, 0AE1 doesn't work on sa-mp.
You can look in snippets section for a playerPool function.

ok the random thing is not sync?

what the heck has changed lol ?
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
ok i got the code but idk how to use it lol

Code:
// FOR ALL PEDS     
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
    0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
    000A: 29@ += 0x1
    if and
        0029:  31@ >= 0x00 
        001B:  0x80 > 31@
    then 
        005A: 31@ += 30@
        // GOT THE PED.
    end
end
// FOR ALL PEDS END

what is the variable i get 30@?
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
blackHat link said:
idk then , but at least i'm sure 100% that they changed many things in the time i left coding ,, like define actor function xDDD

Nothing changed, it's the same.

You need to use that function in a loop, 31@ = a random ped in streamed zone, you need to loop trough it until you find a player that's in the XYZ radius you want.
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
springfield link said:
[quote author=blackHat link=topic=7868.msg44959#msg44959 date=1403453482]
idk then , but at least i'm sure 100% that they changed many things in the time i left coding ,, like define actor function xDDD

Nothing changed, it's the same.

You need to use that function in a loop, 31@ = a random ped in streamed zone, you need to loop trough it until you find a player that's in the XYZ radius you want.
[/quote]

actor define changed  :youdontsay:

ok can i do this with gosub @get_target
 
Status
Not open for further replies.
Top