MaybeRequest form.:
1. Name of the mod (if the mod doesn't exist, you don't have to tell one): I need a snippet or a tip, not a mod.
2. Where you saw it (not the server, we mean if you saw any videos/screenshots about it or not): Nowhere
3. What do you want (the most important part, explain this carefully): How should i find red marker that is on minimap position? I just need to get pos, not to sync it.
4. Details (add more details to your request): n/a
5. Need On/off key or command ?: n/a
6. Which client your server use?: 0.3.7 R3
7. Give any picture or video: n/a
8. You use SAMPFUNCS?: yes.
PHP:
0AB1: call @StoreClosestMarkerPos 0 X 30@ Y 29@ Z 28@
0AB1: call @StoreClosestRaceMarkerPos 0 X 30@ Y 29@ Z 28@
:storeclosestmarkerpos
12@ = 9999.0
for 0@ = 0 to 31
0085: 1@ = 0@
1@ *= 160
1@ += 0xC7DD58
1@ += 48
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
050A: 8@ = distance_between_XYZ 2@ 3@ 4@ and_XYZ 5@ 6@ 7@
if
0025: 12@ > 8@
then
0087: 12@ = 8@
0087: 9@ = 2@
0087: 10@ = 3@
0087: 11@ = 4@
end
end
0AB2: ret 3 9@ 10@ 11@
:storeclosestracemarkerpos
12@ = 9999.0
for 0@ = 0 to 31
0085: 1@ = 0@
1@ *= 56
1@ += 0xC7F158
1@ += 16
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
050A: 8@ = distance_between_XYZ 2@ 3@ 4@ and_XYZ 5@ 6@ 7@
if
0025: 12@ > 8@
then
0087: 12@ = 8@
0087: 9@ = 2@
0087: 10@ = 3@
0087: 11@ = 4@
end
end
0AB2: ret 3 9@ 10@ 11@
or
PHP:
0A8D: 0@ = read_memory 0xC7E008 size 4 virtual_protect 0
0A8D: 1@ = read_memory 0xC7E00C size 4 virtual_protect 0
0A8D: 2@ = read_memory 0xC7E010 size 4 virtual_protect 0
if and
not 0@ == 0.0
not 1@ == 0.0
not 2@ == 0.0
then
// Do something..
end