{$CLEO}
0B34: samp register_client_command "DPTime" to_label @cmd_DPTime
0B34: samp register_client_command "DPWeather" to_label @cmd_DPWeather
0BE3: raknet setup_incoming_rpc_hook @iRPC
0BDE: pause_thread 0
:cmd_DPTime
IF 0B35: samp 0@ = get_last_command_params
THEN 0AA7: call_function {sscanf}0x008220AD num_params 4 pop 4 | {Param2}2@v {Param1}1@v {Format}"%d %d" {String2Scan}0@ | {TotalParams}3@ |
IF 0039: 3@ == 2
THEN 0AB1: call_scm_func @setServerTime params 2 | {byteWorldTime_Hour}1@ {byteWorldTime_Minute}2@ ||
END
END
0B43: samp cmd_ret
:cmd_DPWeather
IF 0B35: samp 0@ = get_last_command_params
THEN
0C1A: 0@ = atoi 0@
01B6: set_weather 0@
END
0B43: samp cmd_ret
:iRPC
0BE5: raknet 0@ = get_hook_param {PacketID}1
IF OR
0039: 0@ == {RPC_SCRSETWEATHER}152
0039: 0@ == {RPC_SCRSETWORLDTIME}94
0039: 0@ == {RPC_SCRSETPLAYERTIME}29
THEN 0BE0: raknet hook_ret FALSE
END
0BE0: raknet hook_ret TRUE
:setServerTime
0BAC: samp 25@ = get_server_settings_ptr
0C0D: struct 25@ offset {byteWorldTime_Hour}0x2C size {BYTE}1 = 0@
0C0D: struct 25@ offset {byteWorldTime_Minute}0x2D size {BYTE}1 = 1@
0AB2: _ret 0 ||
// By DarkP1xel