CLEO Help What's wrong with this Script??

CLEO related
Status
Not open for further replies.

Husnain

Well-known member
Joined
May 20, 2016
Messages
228
Reaction score
9
Location
Mars
PHP:
{$CLEO .CS}

0000:



WHILE TRUE
WAIT 0
IF AND 0AD2: 4@ = player $PLAYER_CHAR targeted_actor //IF and SET
056D:   actor 4@ defined
THEN
0AC8: 5@ = allocate_memory_size 64
0AC8: 7@ = allocate_memory_size 64

0B36: samp 5@ = get_player_nickname 4@ 
0226: 6@ = actor 4@ health 
0470: 7@ = actor 4@ current_weapon 
0B2A: samp 8@ = get_player_ping 4@
0ACC: show_text_lowpriority "~r~Name: ~w~ %s~n~~r~Health: ~w~ %d~n~~r~Current Weapon: ~w~ %s~n~~r~Ping: ~w~ %d" time 3000 5@ 6@ 7@ 8@

0AC9: free_allocated_memory 5@
0AC9: free_allocated_memory 7@
END
END
It shows the target actor name, ping, current weapon and health. But it's not showing. Can someone please help me??


Help guys. Anyone can then please give me a solution -_-
 

andrzej51322

New member
Joined
Jul 23, 2017
Messages
3
Reaction score
0
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread "KULTU"

:KULTU_9
0001: wait 500 ms
00D6: if
0AFA: is_samp_available
004D: jump_if_false @KULTU_9
0B34: samp register_client_command "info" to_label @KULTU_68

:KULTU_57
0001: wait 0 ms
0002: jump @KULTU_57

:KULTU_68
0001: wait 0 ms
0B35: samp 0@ = get_last_command_params
00D6: if
0AD4: 0@ = scan_string 0@ format "%d" 1@
004D: jump_if_false @KULTU_421
00D6: if
0B23: samp is_player_connected 1@
004D: jump_if_false @KULTU_480
0B20: samp 2@ = actor_handle_by_samp_player_id 1@
00D6: if
056D: actor 2@ defined
004D: jump_if_false @KULTU_518
0B36: samp 4@ = get_player_nickname 1@
0AF8: samp add_message_to_chat "| Nick: %s | ID %d|" color -1 4@ 1@
0B43: samp cmd_ret

:KULTU_421
0001: wait 0 ms
0AF8: samp add_message_to_chat "Usage: /info [id]" color 16777215
0B43: samp cmd_ret

:KULTU_480
0001: wait 0 ms
0AF8: samp add_message_to_chat "Player no connected." color 16777215
0B43: samp cmd_ret

:KULTU_518
0001: wait 0 ms
0AF8: samp add_message_to_chat "Not streamed" color 16777215
0B43: samp cmd_ret

Check this example.
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
[shcode=cpp]

{$CLEO}

THREAD "PINFO"

REPEAT
WAIT 0
UNTIL SAMP.Available()

ALLOC 5@ = 200
ALLOC 9@ = 200

WHILE TRUE
WAIT 0
           IF AND
               0AD2: 0@ = $PLAYER_CHAR
               0B2B: 2@ = 0@
           THEN
               WAIT 500
               0B36: 5@ = 2@
               0B25: 6@ = 2@
               0470: 10@ = 0@
               CALL @get_weapon_name_by_id 1 10@ TO 9@
               0B2A: 8@ = 2@
               CHATMSG "Name: %s, Health: %d, Current Weapon: %s, Ping: %d" -1 5@ 6@ 9@ 8@
           END
END

:get_weapon_name_by_id
0AC6: 1@ = label @weapons offset
0@ *= 19
005A: 1@ += 0@
ret 1 1@

:weapons
hex
"Melee" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 0 }
"Brass Knuckles" 00 00 00 00 00 { 1 }
"Golf Club" 00 00 00 00 00 00 00 00 00 00 { 2 }
"Nite Stick" 00 00 00 00 00 00 00 00 00 { 3 }
"Knife" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 4 }
"Baseball" 00 00 00 00 00 00 00 00 00 00 00 { 5 }
"Shovel" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 6 }
"Pool Cue" 00 00 00 00 00 00 00 00 00 00 00 { 7 }
"Katana" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 8 }
"Chainsaw" 00 00 00 00 00 00 00 00 00 00 00 { 9 }
"Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 10 }
"Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 11 }
"Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 12 }
"Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 13 }
"Flowers" 00 00 00 00 00 00 00 00 00 00 00 00 { 14 }
"Cane" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 15 }
"Grenade" 00 00 00 00 00 00 00 00 00 00 00 00 { 16 }
"Tear Gas" 00 00 00 00 00 00 00 00 00 00 00 { 17 }
"Molotov" 00 00 00 00 00 00 00 00 00 00 00 00 { 18 }
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 19 }
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 20 }
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 21 }
"Pistol" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 22 }
"Silencer" 00 00 00 00 00 00 00 00 00 00 00 { 23 }
"Deagle" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 24 }
"Shotgun" 00 00 00 00 00 00 00 00 00 00 00 00 { 25 }
"SawnOff" 00 00 00 00 00 00 00 00 00 00 00 00 { 26 }
"Spas12" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 27 }
"Tec9" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 28 }
"MP5" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 29 }
"AK47" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 30 }
"M4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 31 }
"Mac10" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 32 }
"Rifle" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 33 }
"Sniper" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 34 }
"Rocket Launcher" 00 00 00 00 { 35 }
"HS Rocket Launcher" 00 { 36 }
"Flamethrower" 00 00 00 00 00 00 00 { 37 }
"Minigun" 00 00 00 00 00 00 00 00 00 00 00 00 { 38 }
"C4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 39 }
"Detonator" 00 00 00 00 00 00 00 00 00 00 { 40 }
"Spray" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 41 }
"Fire Extinguisher" 00 00 { 42 }
"Camera" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 43 }
"Nightvision" 00 00 00 00 00 00 00 00 { 44 }
"Infrared Vision" 00 00 00 00 { 45 }
"Parachute" 00 00 00 00 00 00 00 00 00 00 { 46 }
end
[/shcode]
 
Status
Not open for further replies.
Top