CLEO Help Help Report Player

CLEO related
Status
Not open for further replies.

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
Hey i try to make a Report Player.cs... so if you Aim on a player and you think he Have GM than you Press R to make a Report.

Yeah but im not that pro in CLEO ^^

So i just started blind... i know what Opcodes i need for that but jeah thats all i know ^^

Thats what i tried

Code:
THREAD "ReportPlayer"

if 
  8AF7: get_samp_base_to 0@
then 
    0A93: end_custom_thread
end
repeat 
    wait 400
until 0AFA: is_samp_structures_available

while true
wait 0
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
then
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
0B2B: samp 1@ = get_player_id_by_actor_handle 0@
0B36: samp 4@ = get_player_nickname 1@
wait 0
if
0AB0: key_pressed 82
0AF9: samp say_msg "/MS 4@"
end
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
the problem is here :

0AF9: samp say_msg "/MS 4@"

the cleo just doesn't do anything if you put a variable inside a text area. I also tried like this, 0AF9: samp say_msg "/report $targetid cleotest" but it just didn't do anything for me either. I don't know the solution, perhaps opcode or springfield knows about it.
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
{$CLEO .cs}

THREAD "ReportPlayer"

if
8AF7: get_samp_base_to 0@
then
0A93: end_custom_thread
end
repeat
wait 400
until 0AFA: is_samp_structures_available

while true
wait 0
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
then
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
0B2B: samp 1@ = get_player_id_by_actor_handle 0@
0B36: samp 4@ = get_player_nickname 1@
if
0AB0: key_pressed 82
then
0AF9: samp say_msg "/MS %s" 4@
// or to report ID 0AF9: samp say_msg "/MS %d" 1@
end
END
 

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
Ok thanks :) :):)

Yeah sometimes i forgot that CLEO is not AHK in AHK you can put a variable inside everything like

clip := GetClipForCurrentweapon()
AddChatMessage(0xFFFFFF, "{FF0000}[Munition]{FFFFFF} " clip " ")
or
SendChat("Ammo: " clip " ")

But thanks anyway :) :):) and i think, may it will take some time, i will learn this shit :D :D:D

PS: Now i Have changed it to...and when i Press R it gives me massiv Warnigcodes

Code:
{$CLEO .cs}

THREAD "ReportPlayer"

if 
8AF7: get_samp_base_to 0@
then 
0A93: end_custom_thread
end
repeat 
wait 400
until 0AFA: is_samp_structures_available

while true
wait 0
if
0AB0: key_pressed 82
then
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
0B2B: samp 1@ = get_player_id_by_actor_handle 0@
0B36: samp 4@ = get_player_nickname 1@
0AF9: samp say_msg "/MS %s" 1@
// or to report ID 0AF9: samp say_msg "/MS %d" 1@
wait 5000
end
END
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Edit ALL:

what represents the %s and %d Opcode? And how i can change the report cmd? I want to put "/reportar id thereason"
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Ok thanks :) :):)

Code:
{$CLEO .cs}

THREAD "ReportPlayer"

if 
8AF7: get_samp_base_to 0@
then 
0A93: end_custom_thread
end
repeat 
wait 400
until 0AFA: is_samp_structures_available

while true
wait 0
if
0AB0: key_pressed 82
then
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
0B2B: samp 1@ = get_player_id_by_actor_handle 0@
0B36: samp 4@ = get_player_nickname 1@
0AF9: samp say_msg "/MS %s" 1@
// or to report ID 0AF9: samp say_msg "/MS %d" 1@
wait 5000
end
END

%s = string(text)
%d = decimals
So if you want to report the ID use "/ms %d" 1@, if you want to report the nickname use "/ms %s" 4@.
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Hmm, make sure you're using lower case converting.
Also, it should be
Code:
0AF9: "/ms %d" 1@
without the " at the end.
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Are you sure you're using lower case converting? That only happens when sanny compiles every text in caps lock. Go to option - format - right lower - Case converting - As is or lower.
 
Status
Not open for further replies.
Top