CLEO Help I need Help with detect Id script

CLEO related
Status
Not open for further replies.

Billiam

Member
Joined
Dec 2, 2018
Messages
17
Reaction score
2
So yea i got a script , it's supposed to detect the id of the player and use it to send it in a cmd
WHATS WRONG?

{$CLEO .cs}
0000: NOP
:pEPE_1
wait 0
if
0AB0: key_down 66 // KEY 1 NOT NUMPAD.
jf @PEPE_1
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor
jf @PEPE_1
0B2B: samp 1@ = get_player_id_by_actor_handle 0@ //gets the id of the player we are aiming.
0B36: samp 2@ = get_player_nickname 1@ // gets the nickname from 1@ = id of player aimed.
wait 1
0AF9: samp say_msg "/rob %s " 2@ //0AF8: samp add_message_to_chat "I'm aiming to %s - ID %d." color 0xFF6347 2@ 1@ // this will say the nickname and ID of targeted player.
wait 1
jump @PEPE_1
 
Last edited:

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,488
Reaction score
231
Location
( ͡° ͜ʖ ͡°)
High-level uses IF-THEN-ELSE-END statements, often referred to as high-code. <- use this!
Low-level uses jumps (jump or goto and else_jump or jf), often referred to as low-code. <- dont do that.



Code:
{$CLEO .cs}
0000:


REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
0661: NOP "Mod Made by: .."




WHILE TRUE
    WAIT 0
   
   
    IF
    0ADC: test_cheat "robb"
    THEN
        IF
        0@ == TRUE
        THEN
            0@ = FALSE // disable mod
            0AD1: show_formatted_text_highpriority "~R~Auto Accept Bodyguard is now OFF!" time 1000
        ELSE
            0@ = TRUE // enable mod
            0AD1: show_formatted_text_highpriority "~R~Auto Accept Bodyguard is now ON!" time 1000
        END      
    END
   
   
    IF
    0@ == TRUE // status is enabled..:
    THEN
        // while mod is enabled do:
        IF
        0AD2: 1@ = player $PLAYER_CHAR targeted_actor
        THEN
            0B2B: samp 2@ = get_player_id_by_actor_handle 1@
            0B36: samp 3@ = get_player_nickname 2@
            0AF9: samp say_msg "/guard %s" 3@
            wait 1000  
        END      
    END
   
   
END
 

TheDjCody

Active member
Joined
Sep 6, 2018
Messages
40
Reaction score
5
I do a cleo like this ago few weeks, this the code:

Code:
{$CLEO .cs}

0000: NOP

:APUNTARID
wait 150
if and                             
0AD2: 0@ = actor $PLAYER_CHAR targeted_ACTOR //IF and SET
0AB0: 78 //Key "B"
jf @APUNTARCMD
if 0104: actor $PLAYER_ACTOR near_actor 0@ radius  14.0  14.0  14.0 sphere  0 //distance between your pj and target pj
    then
    0B2B: samp 1@ = get_player_id_by_CHAR_handle 0@
    0B36: samp 2@ = get_player_nickname 1@
    0AF9: samp say_msg "/rob %d" 1@
    else
    jump @APUNTARID
    end
:APUNTARCMD
jump @APUNTARID

It's work for me.
 
Status
Not open for further replies.
Top