CLEO Help Script Help

CLEO related
Status
Not open for further replies.

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
294
Reaction score
36
Location
Srbija
Hello Ug-Base, Does anyone know how when a marker appears on my radar to stay there even though let's say the object disappears so that the marker stands in the same place more accurately so it doesn't disappear if the object disappears

Here's the code
Code:
:mark_on_radar     
06AC: 21@ = actor $PLAYER_ACTOR movement_speed
    if 0021:   21@ > 50.0
    then
    21@ = 50.0
    end
006B: 21@ *= 21@
17@ = -0.514
0017: 17@ /= 2500.0
006B: 17@ *= 21@
000B: 17@ += 0.7     
0B60: convert_game_screen_coords 86.0 383.0 to_window_screen_coords 6@ 7@
0AB1: @POSITION_TO_RADAR 7 XYZ 0@ 1@ 2@ RADAR_POS 6@ 7@ DISTANCE_MULTIPLIER 17@ MAX_DISTANCE 130.0 _STORE_TO 0@ 1@ // Pozicija radara Ispod je vise
0B70: draw_polygon_pos 0@ 1@ size 20 20 corners 50 rotation 0 color 3@ // Podesavanja za radar od Fr0z3na 
0AB2: ret 0
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,692
Reaction score
105
Easy way is to just use 02A8 opcode (blip ids). Also make sure you store the handles of the created markers somewhere (array is best) so you can delete them else you will get the situation you had with the race cps.
If you want customised different colour icons like that code above then you need to do something as there is no sort of flag for making the marker stay. That snippet literally does some calculations and draws a polygon for a given frame. Your best bet is to just use gtasa texture system and not sampfuncs render opcodes (use opcode search) where you can set textdraws to be drawn permanently. The downside of that is that you have to load a distinct number of textures for each marker which could be anything. Optimal soloution for this would be to stick to sampfuncs render opcodes but instead store positions to an array and load from array to draw the markers.
 
Status
Not open for further replies.
Top