Advertisement
danya777_kirov

ASDSD

Oct 15th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.24 KB | None | 0 0
  1. {$CLEO}
  2. {$INCLUDE INCLUDES\RakNetDefines.txt}
  3. 0000:
  4.  
  5. if 0@ = SAMP.Base()
  6. then while not SAMP.Available()
  7.         wait 4000
  8.     end
  9.     // CMD
  10.         0B34: samp register_client_command "setmark" to_label @CMD_setmark
  11.         0B34: samp register_client_command "gomark" to_label @CMD_gomark
  12.         0B34: samp register_client_command "delmark" to_label @CMD_delmark
  13.     // END
  14. else end_thread
  15. end
  16.  
  17. var
  18.  $x_coord_for_teleport: array 10 of float
  19.  $y_coord_for_teleport: array 10 of float
  20.  $z_coord_for_teleport: array 10 of float
  21.  
  22.  $marker: array 10 of int
  23.  
  24.  $warning: bool
  25.  $create_marker: array 10 of bool
  26. end
  27.  
  28. $warning = false
  29. $create_marker = false
  30.  
  31. v$fast = "fast"
  32. v$normal = "normal"
  33.  
  34. :return
  35.  
  36. while true
  37.     wait 0
  38. end
  39.  
  40. :CMD_setmark
  41. 0B35: samp 0@ = get_last_command_params
  42. if 0AD4: 1@ = scan_string 0@ format "%d" 2@
  43. then
  44.     2@--
  45.     if and
  46.         2@ >= 0
  47.         2@ <= 9
  48.     then
  49.         Actor.StorePos($player_actor, $x_coord_for_teleport[2@], $y_coord_for_teleport[2@], $z_coord_for_teleport[2@])
  50.         if $create_marker[2@] == true
  51.         then Marker.Disable($marker[2@])
  52.         end
  53.         Marker.CreateIconWithoutSphere($marker[2@], 17, $x_coord_for_teleport[2@], $y_coord_for_teleport[2@], $z_coord_for_teleport[2@])
  54.         $create_marker[2@] = true
  55.     end
  56. else SAMP.AddChatMessage(" *Используйте /setmark [ID]", 0xFFFF00)
  57. end
  58. 0B43: samp cmd_ret
  59.  
  60. :CMD_delmark
  61. 0B35: samp 0@ = get_last_command_params
  62. if 0AD4: 1@ = scan_string 0@ format "%d" 2@
  63. then
  64.     2@--
  65.     if and
  66.         2@ >= 0
  67.         2@ <= 9
  68.     then
  69.         if $create_marker[2@] == true
  70.         jf @return
  71.         Marker.Disable($marker[2@])
  72.         $create_marker[2@] = false
  73.     end
  74. else SAMP.AddChatMessage(" *Используйте /delmark [ID]", 0xFFFF00)
  75. end
  76. 0B43: samp cmd_ret
  77.  
  78. :CMD_gomark
  79. 0B35: samp 0@ = get_last_command_params
  80. if 0AD4: 1@ = scan_string 0@ format "%d%d" 2@ 3@
  81. then
  82.     2@--
  83.     if and
  84.         2@ >= 0
  85.         2@ <= 9
  86.     then
  87.         if Actor.Driving($player_actor)
  88.         then 0@ = 1
  89.         else 0@ = 0
  90.         end
  91.         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@
  92.     end
  93. else SAMP.AddChatMessage(" *Используйте /gomark [ID][mode(fast (0), normal (1))]", 0xFFFF00)
  94. end
  95. 0B43: samp cmd_ret
  96.  
  97. :TELEPORT_ON_SYNC
  98. if $create_marker[4@] == true
  99. jf @return
  100. Actor.StorePos($player_actor, 4@, 5@, 6@)
  101. 050A: 7@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 4@ 5@ 6@
  102. if and
  103.     7@ >= 80.0
  104.     $warning == false
  105. then
  106.     $warning = true
  107.     SAMP.AddChatMessage(" *Дистанция более 80 метров (возможен кик), если хотите ТП, введите /gomark повторно", 0xFFFF00)
  108.     jump @return
  109. end
  110. if 3@ == 1
  111. then
  112.     0AB1: @send_incar_position 3 0@ 1@ 2@
  113.     if 5@ == 0
  114.     then
  115.         wait 0001
  116.         0AB1: @send_incar_position 3 0@ 1@ 2@
  117.     end
  118. else
  119.     0AB1: @send_onfoot_position 3 0@ 1@ 2@
  120.     if 5@ == 0
  121.     then
  122.         wait 0001
  123.         0AB1: @send_onfoot_position 3 0@ 1@ 2@
  124.     end
  125. end
  126. 0AB2: ret 0
  127.  
  128. :send_onfoot_position
  129. 3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
  130. 3@ = SAMP.GetPlayerStruct(3@)
  131. 3@ += 0x6D
  132. 0C0D: struct 3@ offset 6 size 4 = 0@
  133. 0C0D: struct 3@ offset 10 size 4 = 1@
  134. 0C0D: struct 3@ offset 14 size 4 = 2@
  135. 0B3D: raknet 4@ = new_bit_stream
  136. 0B40: raknet bit_stream 4@ write PACKET_PLAYER_SYNC type BS_TYPE_BYTE size 1
  137. 0B40: raknet bit_stream 4@ write 3@ type BS_TYPE_ARRAY size 68
  138. 0B42: raknet send bit_stream 4@ priority PRIORITY_HIGH reliability UNRELIABLE_SEQUENCED ordering_channel 0
  139. 0B3E: raknet delete_bit_stream 4@
  140. 0AB2: ret 0
  141.  
  142. :send_incar_position
  143. 3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
  144. 3@ = SAMP.GetPlayerStruct(3@)
  145. 3@ += 0xB1
  146. 0C0D: struct 3@ offset 24 size 4 = 0@
  147. 0C0D: struct 3@ offset 28 size 4 = 1@
  148. 0C0D: struct 3@ offset 32 size 4 = 2@
  149. 0B3D: raknet 4@ = new_bit_stream
  150. 0B40: raknet bit_stream 4@ write PACKET_PLAYER_SYNC type BS_TYPE_BYTE size 1
  151. 0B40: raknet bit_stream 4@ write 3@ type BS_TYPE_ARRAY size 63
  152. 0B42: raknet send bit_stream 4@ priority PRIORITY_HIGH reliability UNRELIABLE_SEQUENCED ordering_channel 0
  153. 0B3E: raknet delete_bit_stream 4@
  154. 0AB2: ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement