CLEO Help [HELP] Cleo

CLEO related
Status
Not open for further replies.

Harrisonwells

Member
Joined
Jul 9, 2017
Messages
18
Reaction score
0
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 

WHILE TRUE
    WAIT 0 
        
    IF AND
    key_down  2 {Right Mouse}
    key_down 66 {B Key}
    THEN
        IF 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
        THEN
            0B2B: samp 1@ = get_player_id_by_actor_handle 0@
            say "/sellgun %d shotgun" 1@
            wait 2000 /// Anti spam
        END
    END
    
END   /// END WHILE TRUE
[/shcode]

Can someone help me with this code? everytime i RMB+B on someone it says player isn't near you
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
Code:
{$CLEO}

thread "blabla"

REPEAT
WAIT 0
UNTIL SAMP.Available() 

WHILE TRUE
WAIT 0 
        
    IF AND
            key_down 2 
            key_down 66 
    THEN
        IF 
            0AD2: 0@ = $PLAYER_CHAR
        THEN
            0B2B: samp 1@ = get_player_id_by_actor_handle 0@
            say "/sellgun %d" 1@
            wait 2000 
        END
    END
    
END

Works fine for me.
 

Harrisonwells

Member
Joined
Jul 9, 2017
Messages
18
Reaction score
0
0B36 said:
Code:
{$CLEO}

thread "blabla"

REPEAT
WAIT 0
UNTIL SAMP.Available() 

WHILE TRUE
WAIT 0 
        
    IF AND
            key_down 2 
            key_down 66 
    THEN
        IF 
            0AD2: 0@ = $PLAYER_CHAR
        THEN
            0B2B: samp 1@ = get_player_id_by_actor_handle 0@
            say "/sellgun %d" 1@
            wait 2000 
        END
    END
    
END

Works fine for me.
[font=Monaco, Consolas, Courier, monospace]Try to add say"/sellgun %d shotgun" 1@ it aint working[/font]
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
CLEO works as expected with "/sellgun %d shotgun" too and executes the command. The issue lies with the command and how it's scripted, nothing to do with the CLEO.
 

Harrisonwells

Member
Joined
Jul 9, 2017
Messages
18
Reaction score
0
0B36 said:
CLEO works as expected with "/sellgun %d shotgun" too and executes the command. The issue lies with the command and how it's scripted, nothing to do with the CLEO.

But it says That  Player Isn't near you. as i am standing beside him
 

Azad01

New member
Joined
Aug 6, 2017
Messages
1
Reaction score
0
can someone put this scrpit in a .cs file?

{$CLEO}
0000:
0B34: "aarrest" @COMMAND
0@ = 0

:MAIN
wait 0
if
0@ == 1
else_jump @MAIN
if and
056D: actor $PLAYER_ACTOR defined
key_down 49
jf @MAIN
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
056D: actor 1@ defined
jf @MAIN
2@ = SAMP.GetSAMPPlayerIDByActorHandle(1@)
wait 2000
0AF9: samp say_msg "/ke %d" 2@
wait 2000
0AF9: samp say_msg "/ya %d" 2@
wait 500
goto @MAIN

:COMMAND
wait 0
0B12: 0@ = 0@ XOR 1
if
0@ == 0
then
print "~r~Keybinder deactivated. (0)" 1500
end
if
0@ == 1
then
print "~g~Keybinder activated. (1)" 1500
end
Samp.CmdRet
jump @MAIN
 

bladero

Active member
Joined
Jan 3, 2017
Messages
73
Reaction score
0
Script you posted and script that 0B36 posted should work. Make sure you target the player (you have green arrow over his head)
 
Status
Not open for further replies.
Top