Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO}
- {$INCLUDE INCLUDES\RakNetDefines.txt}
- 0000:
- if 0@ = SAMP.Base()
- then while not SAMP.Available()
- wait 4000
- end
- // CMD
- 0B34: samp register_client_command "setmark" to_label @CMD_setmark
- 0B34: samp register_client_command "gomark" to_label @CMD_gomark
- 0B34: samp register_client_command "delmark" to_label @CMD_delmark
- // END
- else end_thread
- end
- var
- $x_coord_for_teleport: array 10 of float
- $y_coord_for_teleport: array 10 of float
- $z_coord_for_teleport: array 10 of float
- $marker: array 10 of int
- $warning: bool
- $create_marker: array 10 of bool
- end
- $warning = false
- $create_marker = false
- v$fast = "fast"
- v$normal = "normal"
- :return
- while true
- wait 0
- end
- :CMD_setmark
- 0B35: samp 0@ = get_last_command_params
- if 0AD4: 1@ = scan_string 0@ format "%d" 2@
- then
- 2@--
- if and
- 2@ >= 0
- 2@ <= 9
- then
- Actor.StorePos($player_actor, $x_coord_for_teleport[2@], $y_coord_for_teleport[2@], $z_coord_for_teleport[2@])
- if $create_marker[2@] == true
- then Marker.Disable($marker[2@])
- end
- Marker.CreateIconWithoutSphere($marker[2@], 17, $x_coord_for_teleport[2@], $y_coord_for_teleport[2@], $z_coord_for_teleport[2@])
- $create_marker[2@] = true
- end
- else SAMP.AddChatMessage(" *Используйте /setmark [ID]", 0xFFFF00)
- end
- 0B43: samp cmd_ret
- :CMD_delmark
- 0B35: samp 0@ = get_last_command_params
- if 0AD4: 1@ = scan_string 0@ format "%d" 2@
- then
- 2@--
- if and
- 2@ >= 0
- 2@ <= 9
- then
- if $create_marker[2@] == true
- jf @return
- Marker.Disable($marker[2@])
- $create_marker[2@] = false
- end
- else SAMP.AddChatMessage(" *Используйте /delmark [ID]", 0xFFFF00)
- end
- 0B43: samp cmd_ret
- :CMD_gomark
- 0B35: samp 0@ = get_last_command_params
- if 0AD4: 1@ = scan_string 0@ format "%d%d" 2@ 3@
- then
- 2@--
- if and
- 2@ >= 0
- 2@ <= 9
- then
- if Actor.Driving($player_actor)
- then 0@ = 1
- else 0@ = 0
- end
- 0AB1: @TELEPORT_ON_SYNC 6 {pos} $x_coord_for_teleport[2@] $y_coord_for_teleport[2@] $z_coord_for_teleport[2@] {driving} 0@ {id} 2@ {mode} 3@
- end
- else SAMP.AddChatMessage(" *Используйте /gomark [ID][mode(fast (0), normal (1))]", 0xFFFF00)
- end
- 0B43: samp cmd_ret
- :TELEPORT_ON_SYNC
- if $create_marker[4@] == true
- jf @return
- Actor.StorePos($player_actor, 4@, 5@, 6@)
- 050A: 7@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 4@ 5@ 6@
- if and
- 7@ >= 80.0
- $warning == false
- then
- $warning = true
- SAMP.AddChatMessage(" *Дистанция более 80 метров (возможен кик), если хотите ТП, введите /gomark повторно", 0xFFFF00)
- jump @return
- end
- if 3@ == 1
- then
- 0AB1: @send_incar_position 3 0@ 1@ 2@
- if 5@ == 0
- then
- wait 0001
- 0AB1: @send_incar_position 3 0@ 1@ 2@
- end
- else
- 0AB1: @send_onfoot_position 3 0@ 1@ 2@
- if 5@ == 0
- then
- wait 0001
- 0AB1: @send_onfoot_position 3 0@ 1@ 2@
- end
- end
- 0AB2: ret 0
- :send_onfoot_position
- 3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
- 3@ = SAMP.GetPlayerStruct(3@)
- 3@ += 0x6D
- 0C0D: struct 3@ offset 6 size 4 = 0@
- 0C0D: struct 3@ offset 10 size 4 = 1@
- 0C0D: struct 3@ offset 14 size 4 = 2@
- 0B3D: raknet 4@ = new_bit_stream
- 0B40: raknet bit_stream 4@ write PACKET_PLAYER_SYNC type BS_TYPE_BYTE size 1
- 0B40: raknet bit_stream 4@ write 3@ type BS_TYPE_ARRAY size 68
- 0B42: raknet send bit_stream 4@ priority PRIORITY_HIGH reliability UNRELIABLE_SEQUENCED ordering_channel 0
- 0B3E: raknet delete_bit_stream 4@
- 0AB2: ret 0
- :send_incar_position
- 3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
- 3@ = SAMP.GetPlayerStruct(3@)
- 3@ += 0xB1
- 0C0D: struct 3@ offset 24 size 4 = 0@
- 0C0D: struct 3@ offset 28 size 4 = 1@
- 0C0D: struct 3@ offset 32 size 4 = 2@
- 0B3D: raknet 4@ = new_bit_stream
- 0B40: raknet bit_stream 4@ write PACKET_PLAYER_SYNC type BS_TYPE_BYTE size 1
- 0B40: raknet bit_stream 4@ write 3@ type BS_TYPE_ARRAY size 63
- 0B42: raknet send bit_stream 4@ priority PRIORITY_HIGH reliability UNRELIABLE_SEQUENCED ordering_channel 0
- 0B3E: raknet delete_bit_stream 4@
- 0AB2: ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement