CLEO Help Help me /settime /setweather

CLEO related
Status
Not open for further replies.

Koolz

Member
Joined
Aug 20, 2020
Messages
17
Reaction score
0
Location
USA
* Name of the mod (if the mod doesn't exist, you don't have to tell one): /settime /setweather
* Where you saw it (not the server, we mean if you saw any videos/screenshots about it or not):
* What do you want (the most important part, explain this carefully) : i want at version 0.3dl and not need sampfuncs
* Details (add more details to your request) : N/A
* On/off key (specify it): Activate by typing /settime /setweather
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
{$CLEO .cs}

0000: NOP

wait 8500

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 
            00C0: set_current_time_hours_to 2@ minutes_to 0
            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

end

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

Attachments

  • Changer.cs
    18.6 KB · Views: 38

Koolz

Member
Joined
Aug 20, 2020
Messages
17
Reaction score
0
Location
USA
PHP:
{$CLEO .cs}

0000: NOP

wait 8500

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
            00C0: set_current_time_hours_to 2@ minutes_to 0
            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

end

:GetLastSentTextFromChatBox
{
    0.3.DL
    0AB1: @GetLastSentTextFromChatBox 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then               
    0A8E: 3@ = 2@ + 0x2ACA14      
    0A8D: 3@ = readMem 3@ sz 4 vp 0    
    0A8E: 4@ = 3@ + 0x14E5 // command 
    0A8E: 5@ = 3@ + 0x1565 // text
end
0AB2: 2 4@ 5@
/setweather is ok to use , /settime is unusable =((
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
What's so hard understand?
I said...
To make it work - time set opcode must be in loop/ must be set every ms....

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

0.3.DL
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@


Can be made any samp you just need change CHATBOX_INPUT_POINTER, good luck.
 

Attachments

  • Changer.cs
    19.2 KB · Views: 54
Joined
Aug 31, 2020
Messages
6
Reaction score
0
Location
Turkey
What's so hard understand?
I said...
To make it work - time set opcode must be in loop/ must be set every ms....

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

0.3.DL
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@


Can be made any samp you just need change CHATBOX_INPUT_POINTER, good luck.
Master !!
 

Koolz

Member
Joined
Aug 20, 2020
Messages
17
Reaction score
0
Location
USA
What's so hard understand?
I said...
To make it work - time set opcode must be in loop/ must be set every ms....

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

0.3.DL
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@


Can be made any samp you just need change CHATBOX_INPUT_POINTER, good luck.
After I install this cleo, /setweather cannot be changed to another id
 

Koolz

Member
Joined
Aug 20, 2020
Messages
17
Reaction score
0
Location
USA
You can divide into 2 sets of cleo 1: / setweather and 1 / settime separately
Because i don't know edit cleo =(((
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
do you have one for 0.3.7-r4?
Just change chat input box pointer..:
This one 0.3.DL
0x2ACA14
To this one 0.3.7 - R4
0x26E9FC

0.3.DL example
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 _Returned: 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@
 
Last edited:
Status
Not open for further replies.
Top