Advance RP | Телепорт по метке
Описание: телепорт с ног для сервера Advance RP. Телепортирет только туда, где есть машина с водителем. Шанс успеха напрямую зависит от вашей интуиции. Кикает частенько, но энивей, имеет место быть.
Требования: CLEO 4.3 / SAMPFUNCS 5.3.3+
Активация: /pstp
Автор метода и скрипта: @astap_
CLEO:
{$CLEO}
{$INCLUDE SF}
hex
00 00
end
THREAD "@ASTAP"
0662: "Advance RP | Телепорт по метке"
0662: "BlastHack.Net | Made by astap_"
0662: "vk.com/fakeastap"
WHILE NOT SAMP.Available()
WAIT 0
END
CHATMSG "{FFFF00}Advance RP {FFFFFF}| Телепорт по метке | {FFFF00}Разработчик: astap_" -1
0BE2: raknet setup_outcoming_packet_hook @onfootSync
0BE4: raknet setup_incoming_packet_hook @vehSync
0b34: "pstp" @pstp
WHILE TRUE {MAIN}
WAIT 0
IF 31@ == TRUE
THEN
0AB6: store_target_marker_coords_to 0@ 1@ 2@
04E4: refresh_game_renderer_at 0@ 1@
03CB: set_rendering_origin_at 0@ 1@ 2@
2@ = 250.0
02CE: 2@ = ground_z_at 0@ 1@ 2@
0C83: samp force_onfoot_sync
25@ = TRUE // SENDS PLAYER SYNC
10@ = TRUE // RECV VEH SYNC
01BD: 28@ = current_time_in_ms
WHILE TRUE
WAIT 0
0C83: samp force_onfoot_sync
01BD: 29@ = current_time_in_ms
0062: 29@ -= 28@
printf "TIME %i" 100 29@
IF 29@ > 1300
THEN
27@ = 1
10@ = FALSE
break // timed out
END
IF 8@ == TRUE
THEN
break
END
END
IF 27@ == 1
THEN GOTO @conclusion
END
25@ == FALSE
18@ = TRUE
print "~Y~please wait~s~." 800
wait 800
print "~Y~please wait~s~.." 800
wait 800
print "~Y~please wait~s~..." 800
wait 900
18@ = FALSE
27@ = 3
:conclusion
IF 27@ == 1
THEN
PRINT "~>~ ~r~timed out ~<~" 2500
0C83: samp force_onfoot_sync
31@ = FALSE
END
IF 27@ == 3
THEN
PRINT "~>~ ~p~successful ~s~teleport ~<~" 2500
0792: disembark_instantly_actor $PLAYER_ACTOR
018C: SOUND 1139 0.0 0.0 0.0
Actor.PutAt($PLAYER_ACTOR 0@ 1@ 2@)
0C83: samp force_onfoot_sync
31@ = FALSE
END
25@ = FALSE
27@ = 0
8@ = FALSE
END
END
:pstp
IF 0AB6: store_target_marker_coords_to 0@ 1@ 2@ // IF and SET
THEN 31@ = TRUE
ELSE PRINT "~>~ ~r~marker not found ~<~" 2500
END
CMDRET
:vehSync
0BE5: raknet 12@ = get_hook_param PARAM_PACKETID
IF AND
12@ == PACKET_VEHICLE_SYNC
10@ == TRUE
THEN
0BE5: raknet 12@ = get_hook_param PARAM_BITSTREAM
0BF3: raknet 12@ = bit_stream 12@ get_data_ptr
0C0C: 13@ = struct 12@ offset 1 size 2 // p id
0C0C: 14@ = struct 12@ offset 3 size 2 // v id
0AFF: samp 15@ = car_handle_by_samp_vehicle_id 14@
Car.StorePos(15@ 5@ 6@ 7@)
050A: 16@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 5@ 6@ 7@
IF AND
16@ < 150.0
8137: not_car 15@ model == #BMX
8137: not_car 15@ model == #BIKE
8137: not_car 15@ model == #MTBIKE
8137: not_car 15@ model == #BANDITO
8137: not_car 15@ model == #KART
8137: not_car 15@ model == #BLOODRA
THEN
8@ = TRUE
10@ = FALSE
0BE0: raknet hook_ret TRUE
END
END
0BE0: raknet hook_ret TRUE
:onfootSync
0BE5: raknet 20@ = get_hook_param PARAM_PACKETID
IF AND
20@ == PACKET_PLAYER_SYNC
25@ == TRUE
THEN
0BE5: raknet 20@ = get_hook_param PARAM_BITSTREAM
0BF1: raknet 21@ = bit_stream 20@ get_write_offset
0BEC: raknet bit_stream 20@ set_write_offset 56
0B40: raknet bit_stream 20@ write 0@ type BS_TYPE_FLOAT size 4
0B40: raknet bit_stream 20@ write 1@ type BS_TYPE_FLOAT size 4
0B40: raknet bit_stream 20@ write 2@ type BS_TYPE_FLOAT size 4
0BEC: raknet bit_stream 20@ set_write_offset 21@
END
0BE5: raknet 20@ = get_hook_param PARAM_PACKETID
IF AND
20@ == PACKET_PLAYER_SYNC
18@ == TRUE
THEN
0BE5: raknet 20@ = get_hook_param PARAM_BITSTREAM
0BF2: raknet 21@ = bit_stream 20@ get_read_offset
0BED: raknet bit_stream 20@ set_read_offset 56
0BE7: raknet 3@ = bit_stream_read 20@ type BS_TYPE_FLOAT
0BE7: raknet 4@ = bit_stream_read 20@ type BS_TYPE_FLOAT
0BE7: raknet 9@ = bit_stream_read 20@ type BS_TYPE_FLOAT
0BED: raknet bit_stream 20@ set_read_offset 21@
050A: 17@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 3@ 4@ 9@
IF 17@ < 15.0
THEN
0C86: samp force_passenger_sync 14@ seat_id 1
END
0BE0: raknet hook_ret FALSE
END
0BE0: raknet hook_ret TRUE
:SEND_PASSENGER_SYNC
0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
alloc 3@ 24
0BBC: samp store_player 2@ passenger_data 3@
0C0D: struct 3@ offset 0 size 2 = 0@
0C0D: struct 3@ offset 2 size 1 = 1@
0BC2: samp send_passenger_data 3@
0B40: raknet bit_stream 4@ write PACKET_PASSENGER_SYNC type BS_TYPE_BYTE size 1
0B40: raknet bit_stream 4@ write 3@ type BS_TYPE_ARRAY size 24
0B8B: raknet send bit_stream 4@
RET 0