CLEO Help Teleport [Help]

CLEO related
Status
Not open for further replies.

KillerZ

Active member
Joined
Apr 6, 2014
Messages
73
Reaction score
0
So I have this code where I go to a certain pos and it teleports me on top of a building, is there another way so that it also gets the z pos? Explanation, I don't want to be teleported if I'm 2+ meters above the coords "-1494.584351, 996.862305, 7.187500". If you need more info comment below.

Teleport:
http://i.imgur.com/2ggZy2H.png

Don't Teleport:
http://i.imgur.com/thVjsAA.png 

Code:
{$CLEO}

0000:

:Load
wait 300 
if
  SAMP.Available
else_jump @Load

while true
wait 0
    if    
        00ED:   actor $PLAYER_ACTOR sphere 0 near_point -1494.584351 996.862305 radius 1.0 1.0 on_foot
    then 
        00A1: put_actor $PLAYER_ACTOR at -1487.458496 993.560486 26.662500
    end
end
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
No, cause the opcodes uses a point(x,y). Just get the player z position, and check if it's above/below your point z position.
 

KillerZ

Active member
Joined
Apr 6, 2014
Messages
73
Reaction score
0
springfield said:
No, cause the opcodes uses a point(x,y).  Just get the player z position, and check if it's above/below  your point z position.

I changed it to 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_JOHNSON_HOUSE $Y_JOHNSON_HOUSE $Z_JOHNSON_HOUSE radius 1.0 1.0 2.0 on_foot, works how I want it. Thanks.
 
Status
Not open for further replies.
Top