CLEO Help Kindly help me - Cleo

CLEO related
Status
Not open for further replies.

Child_

Active member
Joined
May 9, 2015
Messages
115
Reaction score
0
So, I was going through the forums when I saw this script

Code:
{$CLEO .cs}

0000: NOP

:PEPE_22
wait 0
if and
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
0AB0: 49 // KEY 1
jf @PEPE_23
0B2B: samp 2@ = get_player_id_by_actor_handle 0@
0AF9: "/arrest %d" 2@

:PEPE_23
wait 0
if and
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
0AB0: 50 // KEY 2
jf @PEPE_24
0B2B: samp 2@ = get_player_id_by_actor_handle 0@
0AF9: "/e %d" 2@

:PEPE_24
jump @PEPE_22

It was for some CnR's where when you aim at a person and press 1, a command is given to arrest, and when you press 2 a command is giving '/e'

What I need is that if someone could replace '/arrest' with '/cuff' and replace '/e' with '/arrest'.

It'll be very helpful for me, thanks!
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
The gay Gamer link said:
What I need is that if someone could replace '/arrest' with '/cuff' and replace '/e' with '/arrest'.

0AF9: "/arrest %d" 2@
becomes
0AF9: "/cuff %d" 2@

and

0AF9: "/e %d" 2@
becomes
0AF9: "/arrest %d" 2@

what's so hard?  :youdontsay:
 

Child_

Active member
Joined
May 9, 2015
Messages
115
Reaction score
0
I actually tried this and it gave me some 'Unkown opcode 0B2B' error and when I try to run my game while installing this script, I crash at the startup, and I couldn't even decompile that script once its compiled.

So, Please kindly upload a .cs file.
 

Child_

Active member
Joined
May 9, 2015
Messages
115
Reaction score
0
Nah, not working, I get exceptions and then I crash, it happens when I aim at someone and then press 1 or 2.
 

KillerZ

Active member
Joined
Apr 6, 2014
Messages
73
Reaction score
0
Do you have Sampfuncs 5.2.2?

Note: I even tried it in a CnR server and worked perfectly.
 

Attachments

  • SAMPFUNCS.asi
    533.5 KB · Views: 27

KillerZ

Active member
Joined
Apr 6, 2014
Messages
73
Reaction score
0
I tested it a bit more, and for me it only typed /cuff d, and server detects as 0 (basically only allows you to arrest id 0). Same with you?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
{$CLEO .cs}
0000: NOP

REPEAT
    WAIT 100
UNTIL 0AFA:

WHILE TRUE
    WAIT 0
    IF 0AD2: 0@ = $PLAYER_CHAR
    THEN
        0B2B: 1@ = playerId 0@ //get target samp id
        0B36: 2@ = nickname 1@ //get player name
        IF 0AB0: 49
        THEN 0AF9: "/arrest %s" 2@
        ELSE IF 0AB0: 50
            THEN 0AF9: "/e %s" 2@
            END
        END         
    END
END
 

L0S3R

Member
Joined
Jan 3, 2016
Messages
10
Reaction score
0
The gay Gamer link said:
Well, Yeah.

If someone with a good knowledge about CLEO view's this topic.
So by that sarcastic comment you intentionally mean that springfield has "no knowledge about CLEO scripiting"?  :motherofgod_
 

HarrisonFord

Active member
Joined
Nov 25, 2013
Messages
135
Reaction score
3
This was funny.

First:
The gay Gamer link said:
Thanks mate, I'll try it out ASAP

edit; Dude, its exactly what I wanted, +r3p given <3

Then:
The gay Gamer link said:
Nah, not working, I get exceptions and then I crash, it happens when I aim at someone and then press 1 or 2.

Made my day xD
Reaction ->  :face_palm:
 

Child_

Active member
Joined
May 9, 2015
Messages
115
Reaction score
0
You got it wrong, I said it worked when it didn't gave out any exceptions, but when I really tried to use it, It didn't work, But I didn't made any new comment cause I didn't wanted Killer to rage, I just didn't wanted to be a asshole.
 
Status
Not open for further replies.
Top