CLEO Help Switch button to comand..

CLEO related
Status
Not open for further replies.

Dontmindme

Active member
Joined
Jan 21, 2014
Messages
34
Reaction score
0
Hello there fellas, I have ton of cleos, they seem important and I must have it, well the problem with tons of it, is that some of them have the same buttons, and I would like to learn how to work with samp commands such as /something , there is a cleo that uses it such as the HPbar, but it's encrypted there for I can't learn with script, if anyone could redirect me or help me with the script I would appreciate it.
Here is the script by xzytro: http://ugbase.eu/solved-requests/(req)-enable-a-toggle-feature-for-this-mod/msg30070/#msg30070
Well if you read it's gonna say the activate button is F12, but if you use aimbot, it's also F12 for a few, so all I want is to switch it by using the command to /weather . I have tried to search, but I can't find any tutorial or how to do it, small help here..

Code:
// This file was decompiled using SASCM.INI published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'SUNNY_WEATHER' 

:SUNNY_WEATHER_23
wait 0
if
0AB0:   key_pressed 123
else_jump @SUNNY_WEATHER_23
wait 1000
0ACD: show_text_highpriority "ACTIVATED" time 1500
:SET_WEATHER_LOOP
set_weather 1 
:SUNNY_WEATHER_24
wait 0
if
0AB0:   key_pressed 123
else_jump @SET_WEATHER_LOOP
wait 1000
0ACD: show_text_highpriority "DEACTIVATED" time 1500
jump @SUNNY_WEATHER_23
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
8
The cleo down there registers the "/weather" as a command, and then sets weather to 1 (a clean weather) when you typed the registered command.

// This file was decompiled using SASCM.INI published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'CLEAR_WEATHER'

:REG_CMD
wait 0
0B34: samp register_client_command "/weather" to_label @WEATHER_ON

:IFCMDTYPED
wait 0
if
SAMP.IsCommandTyped($command)
else_jump @IFCMDTYPED

:WEATHER_ON
wait 0
set_weather 1
0B43: samp cmd_ret
 

Dontmindme

Active member
Joined
Jan 21, 2014
Messages
34
Reaction score
0
Omg, so many thanks, i might be able to continue from here, thanks :D
Ps: forgot the disable part but i can work with it... :challenge_accepted:
 

Dontmindme

Active member
Joined
Jan 21, 2014
Messages
34
Reaction score
0
Doesn't work, don't know why, I assume it's correct, but with sampfuncs 3.0 now shows the registred commands, and /weather isn't one of them..

Code:
// This file was decompiled using SASCM.INI published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'CLEAR_WEATHER' 
if 
  8AF7: get_samp_base_to 0@
then 
    0A93: end_custom_thread
end
repeat 
    wait 400
until 0AFA: is_samp_structures_available

:REG_CMD
wait 0
0B34: samp register_client_command "/weather" to_label @WEATHER

:IFCMDTYPED
wait 0
if
SAMP.IsCommandTyped($command)
else_jump @IFCMDTYPED

:WEATHER
wait 0
if
0039:   1@ == 0
jf @WEATHER_OFF
jump @WEATHER_ON 

:WEATHER_ON
wait 0
0006: 1@ = 1
set_weather 1
jump @RETURN

:WEATHER_OFF
wait 0
0006: 1@ = 0
01B7: release_weather
jump @RETURN

:RETURN
0B43: samp cmd_ret
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
Code:
{$CLEO}
0662: "SPRGFLD"
0000: "ugbase.eu"

if not 0@ = SAMP.Base()
then 0A93: end_custom_thread
end

while not SAMP.Available()
    wait 100
end

31@ = 0
0B34: samp register_client_command "/weather" to_label @ON_OFF

while true
wait 0
if 31@ == 1
    then
        01B6: set_weather 1
    else
        01B7: release_weather
    end
end



:ON_OFF
0B12: 31@ = 31@ XOR 1
0B43: cmd_ret
:imoverit:
 
Status
Not open for further replies.
Top