CLEO Help how do i use this damn snippets and what does it do?

CLEO related
Status
Not open for further replies.

lederion

Active member
Joined
Mar 15, 2014
Messages
94
Reaction score
0
//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@
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
You just need to "CALL" it for it in your main script
like this
Code:
:MAIN
wait 0
0AB1: CALL @I_CALL_A_SNIPPSET
print "I CALL A SCRIPT"
end

:I_CALL_A_SNIPPSET
// This is just for calling .
 

lederion

Active member
Joined
Mar 15, 2014
Messages
94
Reaction score
0
it will be like this
:MAIN
wait 0
0AB1: CALL @GetscreenXYPingpoint
print "I CALL A SCRIPT"
end

:GetscreenXYPingpoint
// This is just for calling .
?????
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Not just @GetScreenXYPingPoint , when there's a example of calling function , Call correctly like // above
Code:
:MAIN
0AB1: @GetScreenXYPingPoint 1 player_id 0 store_to 1@ 2@

// print "%d %d" 1@ 2@
end
//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