- 49
- 5
CLEO:
{$CLEO}
0000:
while not samp.Available()
wait 100
end
chatmsg "{2067CF}weather and time change By SaMMpeR"
chatmsg "{2067CF}Cmds: /st - time change /sw -weather change"
if 8AAB: file_exists "CLEO\SetTime and SetWeather by SaMMpeR.cs"
then
SAMP.Disconnect(0)
chatmsg "{D52039} Achtung!"
chatmsg "{2067CF} script SetTime and SetWeather by SaMMpeR.cs {D52039} was renamed!"
chatmsg "{D52039} script willn't work until you rename his back"
end
0B34: samp register_client_command "st" to_label @st
0B34: samp register_client_command "sw" to_label @sw_42
0AB3: var 144 = 2
:currenttime
00BF: 20@ = current_time_hours, 21@ = current_time_minutes
:newhour
20@ += 1
21@ = 0
:main
wait 60000
8039: 21@ == 60
jf @newhour
21@ += 1
jump @main
:st
0B35: samp 1@ = get_last_command_params
0C1A: 2@ = atoi 1@
0BAC: samp 25@ = get_server_settings_ptr
0A8E: 26@ = 25@ + 44 // h
0A8E: 27@ = 25@ + 45 // m
0A8C: write_memory 26@ size 1 value 2@ virtual_protect 1
0A8C: write_memory 27@ size 1 value 0 virtual_protect 1
0AF8: samp add_message_to_chat "time changed successly" color 0x2067CF
SAMP.CmdRet()
:sw_39
wait 0
jump @sw_39
:sw_42
SAMP.IsCommandTyped(20@)
if
0AD4: 20@ = scan_string 20@ format "%d" 21@
then
0B2D: write_samp_memory offset 0xB4F0 value 0xC390 size 2
01B6: set_weather 21@
0AF8: samp add_message_to_chat "weather changed successly" color 0x2067CF
end
SAMP.CmdRet()