CLEO Help fyp ping calcualtion opcode

CLEO related
Status
Not open for further replies.

lederion

Active member
Joined
Mar 15, 2014
Messages
94
Reaction score
0
so if i want to draw a box then i must write 038E: draw_box_position size 640.0 448.0 RGBA 0 0 0 255,then what do i have to put in position?
 

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
This should work:

Code:
//0AB1: @GetScreenXYPingPoint 1 player_id 0 store_to 1@ 2@
:GetScreenXYPingPoint
{
  Original code bY FYP
  Snippet bY M1ZG4RD
}
2@ = SAMP.GetActorHandleByPlayerID(0@)
if 
   not Actor.Driving(2@)
then
  0A96: 6@ = actor 2@ struct 
  6@ += 68 
  0A8D: 3@ = read_memory 6@ size 4 virtual_protect 0 
  6@ += 4 
  0A8D: 4@ = read_memory 6@ size 4 virtual_protect 0 
  6@ += 4 
  0A8D: 5@ = read_memory 6@ size 4 virtual_protect 0 
else 
  6@ = Actor.CurrentCar(2@)
  0A97: 6@ = car 6@ struct 
  6@ += 68 
  0A8D: 3@ = read_memory 6@ size 4 virtual_protect 0 
  6@ += 4 
  0A8D: 4@ = read_memory 6@ size 4 virtual_protect 0 
  6@ += 4 
  0A8D: 5@ = read_memory 6@ size 4 virtual_protect 0
end
Actor.StorePos(2@, 6@, 7@, 8@)
9@ = SAMP.GetPlayerPing(0@)
11@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
10@ = SAMP.GetPlayerPing(11@)
005A: 9@ += 10@ // (int) 
0093: 10@ = integer 9@ to_float
12@ = 17.0 
12@ /= 360.0 
006B: 3@ *= 12@ // (float) 
006B: 4@ *= 12@ // (float) 
006B: 5@ *= 12@ // (float) 
006B: 3@ *= 10@ // (float) 
006B: 4@ *= 10@ // (float) 
006B: 5@ *= 10@ // (float) 
005B: 6@ += 3@ // (float) 
005B: 7@ += 4@ // (float) 
005B: 8@ += 5@ // (float)  
SAMP.Convert3DCoordsToScreen(6@, 7@, 8@, 6@, 7@)
ret 2 6@ 7@
 
Status
Not open for further replies.
Top