#1 GTA Modding » Non-Race Checkpoints and Auto Driving. » 13-04-2011 19:10

Vance
Replies: 0

I've searched google and many other CLEO sites for an answer and still haven't come up with anything.

The two types of checkpoints in GTA that cars go through are the big red one with a pointer inside of it, and the one that is just big and red, with no pointer in the center.

My goal is to find the closest standard checkpoint (No Pointer) and relay its coords to an auto driving script.

Pseudo code:
:search
Find nearest Checkpoint.
Get/save coords.
set coords as auto driver destination
if coord distance <= 10 units away from player coords
--- Goto :search
else stop script

I already have a CLEO that goes to the target coords a player sets via "Map" in the escape menu. I just want to replace the Target coords with the closest checkpoint.

Thanks in advance.

#2 Re: GTA Modding » [Req|Help] Police Radar » 12-08-2010 08:32

Everytime I compile 03E5 with one param. it will give an error that there is not enough params. but when I add the 4@ = it will compile.

#3 Re: GTA Modding » [Req|Help] Police Radar » 12-08-2010 01:34

Thanks for the quick reply.

Here is what I got so far and it crashes on start up.

{$CLEO .cs}
//---------------MAIN------------------

:POLCAR
actor.storepos($PLAYER_ACTOR, 0@, 1@, 2@)
actor.storepos($PLAYER_ACTOR, 2@, 3@, 4@)
0@ += 50.0
2@ -= 50.0
1@ += 25.0
3@ -= 25.0
0327: 4@ = get_random_car_with_model #COPCARLA in_rectangle_cornerA 0@ 1@ cornerB 2@ 3@
if
  4@ <> -1
then
if
  056E: car 4@ defined
then
03E5: 4@ = show_text_box ‘POL_MPL’
end
end

I'm using the GXT hook for the text draw and the FXT is this

#  Format:
#  <GXT ENTRY><SPACE><TEXT>
#

POL_MPL !!ALERT!!

Mind helping me with this one?


-Edit-
Also I can't seem to find the .cs in the cleo folder after I compile.

#4 GTA Modding » [Req|Help] Police Radar » 11-08-2010 09:52

Vance
Replies: 7

I am new to CLEO scripting, but have known and used CLEO before. After searching and finding nothing, I have come to see if someone could help me with this. To the point...

I want to make a "Police Radar" with CLEO. The point of it would be to detect the Model ID of a police car within a 3 to 5 block radius. If one is found then a textdraw would show saying that a cruiser was near.

In my search thru Opcodes I found 056C which is "actor $PLAYER_ACTOR driving_police_car"
I don't know if that could be used to detect the car.
Also found 0186 which is the "create_marker_above_car" Opcode.

I couldn't find out how to detect a radius around the player though.

Of course proper respect and credits would be made if someone built the whole thing for me. I also don't mind if someone points me in the right direction to get this done.
Thank you in advance.

Board footer

Powered by FluxBB