CLEO Help Help me

CLEO related
Status
Not open for further replies.

Koolz

Member
Joined
Aug 20, 2020
Messages
17
Reaction score
0
Location
USA
help me convert weather and time to version 0.3dl , please
 

Attachments

  • set weather and time by hnnsy.cs
    62.8 KB · Views: 1

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
1. /settime 4 - make your time 4 morning
2. /settime - this is for returning time back to normal, you just need enter command without time...
3. /setweather 10 - sets weather to SUNNY_VEGAS , depends which id you choose, more about id's check bellow:
https://gtamods.com/wiki/Memory_Addresses_(SA)#Weather_Codes

PHP:
{$CLEO .cs}

0000: NOP

wait 8500

00BF: 7@ = current_time_hours, 6@ = current_time_minutes

while true
wait 0

if
0256:   player $PLAYER_CHAR defined
then
    0AB1: @GetLastSentTextFromChatBox 0 _Return: Command 0@ Text 1@
    if 0AD4: $NOT_USED = scan_string 1@ format "/settime %d" 2@
    then
        if not 2@ > 24
        then
            0085: 4@ = 2@ // copy to save time which was entered for later
            5@ = true // enable and make infinity loop to set time every ms
            0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 // clear last entered text
        end
    else
        if 0AD4: $NOT_USED = scan_string 1@ format "/settime"
        then
            0085: 4@ = 7@ // set variable 4@ to default server time which was when you entered to server
            0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 // clear last entered text
        end
    end
    if 0AD4: $NOT_USED = scan_string 1@ format "/setweather %d" 3@
    then
        if and
        not 3@ < 0
        not 3@ > 45
        then
            0A8C: write_memory 0xC81320 size 4 value 3@ virtual_protect 0
            0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 // clear last entered text
        end
    end
end

if 5@ == true
then 00C0: set_current_time_hours_to 4@ minutes_to 0
end

end

:GetLastSentTextFromChatBox
{
    0.3.DL
    0AB1: @GetLastSentTextFromChatBox 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then           
    0A8E: 3@ = 2@ + 0x2ACA14 // CHATBOX_INPUT_POINTER  
    0A8D: 3@ = readMem 3@ sz 4 vp 0
    0A8E: 4@ = 3@ + 0x14E5 // command
    0A8E: 5@ = 3@ + 0x1565 // text
end
0AB2: 2 4@ 5@
 

Koolz

Member
Joined
Aug 20, 2020
Messages
17
Reaction score
0
Location
USA
1. /settime 4 - make your time 4 morning
2. /settime - this is for returning time back to normal, you just need enter command without time...
3. /setweather 10 - sets weather to SUNNY_VEGAS , depends which id you choose, more about id's check bellow:
https://gtamods.com/wiki/Memory_Addresses_(SA)#Weather_Codes

PHP:
{$CLEO .cs}

0000: NOP

wait 8500

00BF: 7@ = current_time_hours, 6@ = current_time_minutes

while true
wait 0

if
0256:   player $PLAYER_CHAR defined
then
    0AB1: @GetLastSentTextFromChatBox 0 _Return: Command 0@ Text 1@
    if 0AD4: $NOT_USED = scan_string 1@ format "/settime %d" 2@
    then
        if not 2@ > 24
        then
            0085: 4@ = 2@ // copy to save time which was entered for later
            5@ = true // enable and make infinity loop to set time every ms
            0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 // clear last entered text
        end
    else
        if 0AD4: $NOT_USED = scan_string 1@ format "/settime"
        then
            0085: 4@ = 7@ // set variable 4@ to default server time which was when you entered to server
            0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 // clear last entered text
        end
    end
    if 0AD4: $NOT_USED = scan_string 1@ format "/setweather %d" 3@
    then
        if and
        not 3@ < 0
        not 3@ > 45
        then
            0A8C: write_memory 0xC81320 size 4 value 3@ virtual_protect 0
            0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 // clear last entered text
        end
    end
end

if 5@ == true
then 00C0: set_current_time_hours_to 4@ minutes_to 0
end

end

:GetLastSentTextFromChatBox
{
    0.3.7 - R4
    0AB1: @GetLastSentTextFromChatBox 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then           
    0A8E: 3@ = 2@ + 0x26E9FC // CHATBOX_INPUT_POINTER  
    0A8D: 3@ = readMem 3@ sz 4 vp 0
    0A8E: 4@ = 3@ + 0x14E5 // command
    0A8E: 5@ = 3@ + 0x1565 // text
end
0AB2: 2 4@ 5@
Are there any files because I don't know how to edit file
 
Status
Not open for further replies.
Top