CLEO Help Checkpoint (Hatiko Waiting)

CLEO related
Status
Not open for further replies.

JaggerJam

Active member
Joined
Sep 14, 2017
Messages
97
Reaction score
21
Hi guys, here I have a problem... Please help me... I want the chatmsg to show up only one time on that coordonates, but it only spams...

I have tried everything, I have spent 3 weeks to solve this, but no result..



Code:
{$CLEO}
0000:
repeat
   wait 0
until 0afa:

WHILE TRUE
wait 0
if
call @is_cp_active_LS 0
then
   31@ = 0
   call @get_cp_pos_LS 0 0@ 1@ 2@

    if and
    0@ ==  1554.532104
    1@ ==  -1675.580688
    2@ ==  16.195313
    then
        31@ = 1
        if
        31@ == 1
        then
            31@ = 4
            018C: play_sound 1052 at 0.0 0.0 0.0
            chatmsg "text1" -1
        end
    end

    if and
    0@ ==  2287.257813
    1@ ==  2431.447998
    2@ ==  10.820302
    then
        31@ = 2
        if
        31@ == 2
        then
            31@ = 4
            018C: play_sound 1052 at 0.0 0.0 0.0
            chatmsg "text2" -1
        end
    end

    if and
    0@ ==  -1605.046143
    1@ ==  711.501038
    2@ ==  13.867177
    then
        31@ = 3
        if
        31@ == 3
        then
            31@ = 4
            018C: play_sound 1052 at 0.0 0.0 0.0
            chatmsg "text2" -1
        end
     end
end

END // END WHILE TRUE

:is_cp_active_LS
0AA2: 0@ = loadlib "samp.dll"
0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x24
0A8D: 1@ = readMem 1@ sz 4 vp 0
IF 1@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AA3: freelib 0@
0AB2: ret 0

:get_cp_pos_LS
0AA2: 0@ = loadlib "samp.dll"
0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0xC
0A8D: 2@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 3@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 4@ = readMem 1@ sz 4 vp 0
0AA3: freelib 0@
0AB2: ret 3 2@ 3@ 4@
 

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
easy
Code:
{$CLEO}
0000:
repeat
  wait 0
until 0afa:

WHILE TRUE
wait 0
if
call @is_cp_active_LS 0
then
  call @get_cp_pos_LS 0 0@ 1@ 2@
   if and
   0@ ==  1554.532104
   1@ ==  -1675.580688
   2@ ==  16.195313
   then
           018C: play_sound 1052 at 0.0 0.0 0.0
           chatmsg "text1" -1
           repeat
           wait 0
           call @get_cp_pos_LS 0 0@ 1@ 2@
           if and
           not 0@ ==  1554.532104
           not 1@ ==  -1675.580688 
           not 2@ ==  16.195313 
           then break
           end
            if
            8256: not  player $PLAYER_CHAR defined
            then break
            end
           until false
   end  
   if and
   0@ ==  2287.257813
   1@ ==  2431.447998
   2@ ==  10.820302
   then
           018C: play_sound 1052 at 0.0 0.0 0.0
           chatmsg "text2" -1
           repeat
               wait 0
               call @get_cp_pos_LS 0 0@ 1@ 2@
               if and
                  not 0@ ==  2287.257813
                  not 1@ ==  2431.447998
                  not 2@ ==  10.820302
                  then break
                  end
                if
               8256: not  player $PLAYER_CHAR defined
                then break
                end
               until false
   end
   if and
   0@ ==  -1605.046143
   1@ ==  711.501038
   2@ ==  13.867177
   then
           018C: play_sound 1052 at 0.0 0.0 0.0
           chatmsg "text2" -1
           repeat
               wait 0
               call @get_cp_pos_LS 0 0@ 1@ 2@
               if and
               not 0@ ==  -1605.046143 
               not 1@ ==  711.501038
               not 2@ ==  13.867177
               then break
               end
                if
               8256: not  player $PLAYER_CHAR defined
                then break
                end
               until false
     
       end
    end
END

:is_cp_active_LS
0AA2: 0@ = loadlib "samp.dll"
0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x24
0A8D: 1@ = readMem 1@ sz 4 vp 0
IF 1@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AA3: freelib 0@
0AB2: ret 0

:get_cp_pos_LS
0AA2: 0@ = loadlib "samp.dll"
0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0xC
0A8D: 2@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 3@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 4@ = readMem 1@ sz 4 vp 0
0AA3: freelib 0@
0AB2: ret 3 2@ 3@ 4@
 

JaggerJam

Active member
Joined
Sep 14, 2017
Messages
97
Reaction score
21
noob213 said:
easy
Code:
{$CLEO}
0000:
repeat
  wait 0
until 0afa:

WHILE TRUE
wait 0
if
call @is_cp_active_LS 0
then
  call @get_cp_pos_LS 0 0@ 1@ 2@
   if and
   0@ ==  1554.532104
   1@ ==  -1675.580688
   2@ ==  16.195313
   then
           018C: play_sound 1052 at 0.0 0.0 0.0
           chatmsg "text1" -1
           repeat
           wait 0
           call @get_cp_pos_LS 0 0@ 1@ 2@
           if and
           not 0@ ==  1554.532104
           not 1@ ==  -1675.580688 
           not 2@ ==  16.195313 
           then break
           end
            if
            8256: not  player $PLAYER_CHAR defined
            then break
            end
           until false
   end  
   if and
   0@ ==  2287.257813
   1@ ==  2431.447998
   2@ ==  10.820302
   then
           018C: play_sound 1052 at 0.0 0.0 0.0
           chatmsg "text2" -1
           repeat
               wait 0
               call @get_cp_pos_LS 0 0@ 1@ 2@
               if and
                  not 0@ ==  2287.257813
                  not 1@ ==  2431.447998
                  not 2@ ==  10.820302
                  then break
                  end
                if
               8256: not  player $PLAYER_CHAR defined
                then break
                end
               until false
   end
   if and
   0@ ==  -1605.046143
   1@ ==  711.501038
   2@ ==  13.867177
   then
           018C: play_sound 1052 at 0.0 0.0 0.0
           chatmsg "text2" -1
           repeat
               wait 0
               call @get_cp_pos_LS 0 0@ 1@ 2@
               if and
               not 0@ ==  -1605.046143 
               not 1@ ==  711.501038
               not 2@ ==  13.867177
               then break
               end
                if
               8256: not  player $PLAYER_CHAR defined
                then break
                end
               until false
     
       end
    end
END

:is_cp_active_LS
0AA2: 0@ = loadlib "samp.dll"
0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x24
0A8D: 1@ = readMem 1@ sz 4 vp 0
IF 1@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AA3: freelib 0@
0AB2: ret 0

:get_cp_pos_LS
0AA2: 0@ = loadlib "samp.dll"
0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0xC
0A8D: 2@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 3@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 4@ = readMem 1@ sz 4 vp 0
0AA3: freelib 0@
0AB2: ret 3 2@ 3@ 4@

OMG  :not bad: , thx... But the text will not appear twice if the checkpoint will be in the same coordonates from last one, it works if the next checkpoint will be in another coordonates and then the put checkpoint to needed coordonates. Example:

checkpoint on coordonates for text2 > text appears > deleting the marker > again checkpoint on coordonates for text2 > nothing 

IF
checkpoint on coordonates for text2 > text appears > deleting the marker > checkpoint on coordonates for text1 >  text appears > deleting the marker > checkpoint on coordonates for text2 > text appears > deleting the marker .

And antoher thing, while i have a checkpoint on one of coordonates and i'm getting killed, text is spams in chat.


And can you put verification on color?

5@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
29@ = SAMP.GetPlayerColor(5@)
if or
0039: 29@ == 0xff1732e8
0039: 29@ == 0xff2b46ff
0039: 29@ == 0xff1016e
then
 
Status
Not open for further replies.
Top