CLEO Help Help

CLEO related
Status
Not open for further replies.

DjFox

Member
Joined
Mar 29, 2015
Messages
17
Reaction score
1
Hi guys, can anyone correct this mod please, when i type /night only weather get changed time no
Code:
:night
01B6: setWeather 0
00C0: set_current_time_hours_to 0 minutes_to 0
SAMP.CmdRet
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,161
Solutions
5
Reaction score
894
Location
Lithuania
here..
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

0B34: "night" @Night

WHILE TRUE
WAIT 0
END

:Night

01B6: set_weather 10 /// Perfect weather
00C0: set_current_time_hours_to 1 minutes_to 10 /// 1 Hour 10 mins

0B43:

[/shcode]
 

DjFox

Member
Joined
Mar 29, 2015
Messages
17
Reaction score
1
Parazitas said:
here..
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

0B34: "night" @Night

WHILE TRUE
WAIT 0
END

:Night

01B6: set_weather 10 /// Perfect weather
00C0: set_current_time_hours_to 1 minutes_to 10 /// 1 Hour 10 mins

0B43:

[/shcode]

only weather get changed time no :(
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
DjFox said:
Parazitas said:
here..
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

0B34: "night" @Night

WHILE TRUE
WAIT 0  
END

:Night

01B6: set_weather 10 /// Perfect weather
00C0: set_current_time_hours_to 1 minutes_to 10  /// 1 Hour 10 mins

0B43:

[/shcode]

only weather get changed time no :(

Maybe server have some restrictions?
 

WaTTi

Well-known member
Joined
Jan 4, 2015
Messages
260
Reaction score
8
you have 2 ways.

setting the time every ms

Code:
{$CLEO .cs}
0000:
 
while not samp.Available()
wait 0
end 

0@ = 0
0B34: "night" @Night
  
while true
wait 0
    if 0@ == 1
    then 00C0: set_current_time_hours_to 1 minutes_to 10
    end
end 

:Night
if 0@ == 0
then
    0@ = 1
    // save old weather
    0D59: 1@ = current_weather
    01B6: set_weather 10
else
    0@ = 0
    01B6: set_weather 1@
end
cmdret


or block server SetPlayerTime and SetWorldTime rpc

Code:
{$CLEO .cs}
0000:
 
while not samp.Available()
wait 0
end 

0BE3: raknet setup_incoming_rpc_hook @lifesucks

0@ = 0
0B34: "night" @Night
  
while true
wait 0
end 

:Night
if 0@ == 0
then
    0@ = 1
    0D59: 1@ = current_weather
    01B6: set_weather 10
    then 00C0: set_current_time_hours_to 1 minutes_to 10
else
    0@ = 0
    01B6: set_weather 1@
end
cmdret

:lifesucks
0BE5: raknet 2@ = get_hook_param 
if 0@ == 1
then
    if or 2@ == 29
    if or 2@ == 94
    then 0BE0: raknet hook_ret FALSE
    end
end
0BE0: raknet hook_ret true

 
Status
Not open for further replies.
Top