


{$CLEO .cs}
0B34: samp register_client_command "co" to_label @activation
0000: NOP
0@ = 0
:Control
wait 0
if 0@ == 1
then
036A: put_actor $PLAYER_ACTOR in_car 5@
0@ = 2
else
if 0@ == 3
then
036A: put_actor $PLAYER_ACTOR in_car 4@
0@ = 0
end
end
jump @control
:activation
wait 0
if 0@ == 2
then
0B2D: write samp_memory 0x12D60 value 1@ size 2
0B2D: write samp_memory 0x13FA0 value 2@ size 2
0B2D: write samp_memory 0x78560 value 3@ size 2
0@ = 3
0159: camera_on_ped $PLAYER_ACTOR mode 4 switchstyle 2
015A: restore_camera
02EB: restore_camera_with_jumpcut
0373: set_camera_directly_behind_player
0AF8: samp add_message_to_chat "{8650AC}[CarControl]: {FF0000}You are no longer in control!" color 0xFFFFFF
SAMP.CmdRet
end
if and
Player.Defined($PLAYER_ACTOR)
0449: actor $PLAYER_ACTOR in_a_car
then
0B35: samp 25@ = get_last_command_params
if
0AD4: 26@ = scan_string 25@ format "%d" 24@ //IF and SET
then
if
0B23: samp is_player_connected 24@
then
if
0B20: samp 27@ = actor_handle_by_samp_player_id 24@
then
if
0449: actor 27@ in_a_car
then
5@ = Actor.CurrentCar(27@)
0B2E: 1@ = read_samp_memory 0x12D60 size 2
0B2D: write samp_memory 0x12D60 value 0xC390 size 2
0B2E: 2@ = read_samp_memory 0x13FA0 size 2
0B2D: write samp_memory 0x13FA0 value 0xC390 size 2
0B2E: 3@ = read_samp_memory 0x78560 size 2
0B2D: write samp_memory 0x78560 value 0xC20400 size 2
4@ = Actor.CurrentCar($PLAYER_ACTOR)
0@ = 1
0158: camera_on_car 5@ mode 18 switchstyle 2
0AF8: samp add_message_to_chat "{8650AC}[CarControl]: {00CD00}You are in control now!" color 0xFFFFFF
else 0AF8: samp add_message_to_chat "Specified player must be driving" color 0x9000
end
else 0AF8: samp add_message_to_chat "Specified player is not streamed in" color 0x9000
end
else 0AF8: samp add_message_to_chat "Specified player is offline" color 0x9000
end
else 0AF8: samp add_message_to_chat "Wrong format" color 0x9000
end
else
0AF8: samp add_message_to_chat "You must be in a car" color 0x9000
end
SAMP.CmdRet
