CLEO HELP Script Help

Frozen

Well-Known Member
Joined
Nov 20, 2019
Messages
140
Likes
6
Points
18
Location
Beograd
#1
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: [email protected] = actor $PLAYER_ACTOR movement_speed
    if 0021:   [email protected] > 50.0
    then
    [email protected] = 50.0
    end
006B: [email protected] *= [email protected]
[email protected] = -0.514
0017: [email protected] /= 2500.0
006B: [email protected] *= [email protected]
000B: [email protected] += 0.7     
0B60: convert_game_screen_coords 86.0 383.0 to_window_screen_coords [email protected] [email protected]
0AB1: @POSITION_TO_RADAR 7 XYZ [email protected] [email protected] [email protected] RADAR_POS [email protected] [email protected] DISTANCE_MULTIPLIER [email protected] MAX_DISTANCE 130.0 _STORE_TO [email protected] [email protected] // Pozicija radara Ispod je vise
0B70: draw_polygon_pos [email protected] [email protected] size 20 20 corners 50 rotation 0 color [email protected] // Podesavanja za radar od Fr0z3na 
0AB2: ret 0
 

Zin

Well-Known Member
Joined
Aug 1, 2013
Messages
1,472
Likes
58
Points
98
Website
youtube.com
#3
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.
 
Top