Метод который использовался в моём телепорте для сервера Arizona RP.
Спасибо @Azller Lollison за помощь.
Разработчикам азазоны желаю удачи и скорейшего фикса.
:bravo:
[hide=6000][/hide]
[hide=6000]Спасибо @Azller Lollison за помощь.
Разработчикам азазоны желаю удачи и скорейшего фикса.
:bravo:
[hide=6000][/hide]
CLEO:
{$CLEO}
{$INCLUDE SF}
0000:
thread "astap"
while not SAMP.Available()
wait 0
end
0b34: "arzgo" @arzgo
0b34: "agom" @agom
0BE3: raknet setup_incoming_rpc_hook @RPChook
chatmsg "{ffff00}Arizona RP {ffffff}| Телепорт по метке | {ffff00}Успешная авторизиция." -1
chatmsg "{ffff00}Arizona RP {ffffff}| Телепорт по метке | {ffff00}Используй: /arzgo & /agom" -1
while true
wait 0
if 31@ == true
then
04E4: refresh_game_renderer_at 0@ 1@
03CB: set_rendering_origin_at 0@ 1@ 2@
if
18@ == false
then
2@ += 500.0
02CE: 2@ = ground_z_at 0@ 1@ 2@
end
if Actor.Driving($PLAYER_ACTOR) // INCAR TELEPORT
then
wait 2000
03C0: 16@ = actor $PLAYER_ACTOR car
0B2C: samp 10@ = get_vehicle_id_by_car_handle 16@
Actor.StorePos($PLAYER_ACTOR 11@ 12@ 13@)
13@ += 3.0
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 11@ 12@ 13@
wait 300
0B30: samp send_enter_vehicle 10@ as_passenger false
wait 1000
call @Quaternion_get 1 0 6@ 7@ 8@ 9@
call @SendOnfootSync 8 0@ 1@ -95.0 6@ 7@ 8@ 9@ 10@
00AB: put_car 16@ at 0@ 1@ 2@
call @SendInCarFakePosition 3 0@ 1@ -95.0
0@ += 2.0
1@ += 2.0
Actor.PutAt($PLAYER_ACTOR, 0@ 1@ 2@)
0B30: samp send_enter_vehicle 10@ as_passenger false
wait 1000
072A: put_actor $PLAYER_ACTOR into_car 16@ driverseat
04E4: refresh_game_renderer_at 0@ 1@
03CB: set_rendering_origin_at 0@ 1@ 2@
02EB: restore_camera_with_jumpcut
31@ = false
wait 400
print "incar ~y~teleported" 1500
else
wait 1500 // ONFOOT TELEPORT
call @Quaternion_get 1 0 6@ 7@ 8@ 9@
0C83: samp force_onfoot_sync
Actor.PutAt($PLAYER_ACTOR , 0@ 1@ 2@)
call @SendOnfootSync 8 0@ 1@ -95.0 6@ 7@ 8@ 9@ 4@
0C83: samp force_onfoot_sync
04E4: refresh_game_renderer_at 0@ 1@
03CB: set_rendering_origin_at 0@ 1@ 2@
02EB: restore_camera_with_jumpcut
print "onfoot ~y~teleported" 2000
wait 1000
31@ = false
end
end
end
:SendOnfootSync
8@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
0BBA: samp store_player 8@ onfoot_data 9@
alloc 9@ 68
0C0D: struct 9@ offset 6 size 4 = 0@ // x
0C0D: struct 9@ offset 10 size 4 = 1@ // y
0C0D: struct 9@ offset 14 size 4 = 2@ // z
0C0D: struct 9@ offset 18 size 4 = 3@ // q
0C0D: struct 9@ offset 22 size 4 = 4@ // q
0C0D: struct 9@ offset 26 size 4 = 5@ // q
0C0D: struct 9@ offset 30 size 4 = 6@ // q
0C0D: struct 9@ offset 38 size 4 = 0.0
0C0D: struct 9@ offset 42 size 4 = 0.0
0C0D: struct 9@ offset 46 size 4 = -0.903
0C0D: struct 9@ offset 50 size 4 = 0.0 // surf Offset
0C0D: struct 9@ offset 54 size 4 = 0.0 // surf Offset
0C0D: struct 9@ offset 58 size 4 = 0.0 // surf Offset
0C0D: struct 9@ offset 62 size 2 = 7@ // carID
0C0D: struct 9@ offset 64 size 2 = 0 //
0C0D: struct 9@ offset 66 size 2 = 0 //
0BC0: samp send_onfoot_data 9@
free 9@
ret 0
:SendInCarFakePosition
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
0AC8: 4@ = allocate_memory_size 63
0BBB: samp store_player 3@ incar_data 4@
0C0D: struct 4@ offset 24 size 4 = 0@
0C0D: struct 4@ offset 28 size 4 = 1@
0C0D: struct 4@ offset 32 size 4 = 2@
0BC1: samp send_incar_data 4@
0AC9: free_allocated_memory 4@
0AB2: ret 0
:RPChook // GET CHECKPOINT
0BE5: raknet 30@ = get_hook_param PARAM_PACKETID
if
30@ == RPC_SCRSETRACECHECKPOINT
then
23@ = true
0BE5: raknet 30@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 19@ = bit_stream_read 30@ type BS_TYPE_BYTE // type
0BE7: raknet 0@ = bit_stream_read 30@ type BS_TYPE_FLOAT
0BE7: raknet 1@ = bit_stream_read 30@ type BS_TYPE_FLOAT
0BE7: raknet 2@ = bit_stream_read 30@ type BS_TYPE_FLOAT
0BE0: raknet hook_ret true
end
if 30@ == RPC_SCRSETCHECKPOINT // pizza
then
23@ = true
0BE5: raknet 30@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 0@ = bit_stream_read 30@ type BS_TYPE_FLOAT
0BE7: raknet 1@ = bit_stream_read 30@ type BS_TYPE_FLOAT
0BE7: raknet 2@ = bit_stream_read 30@ type BS_TYPE_FLOAT
0BE0: raknet hook_ret true
end
if 30@ == RPC_SCRDISABLECHECKPOINT
then
23@ = false
0BE0: raknet hook_ret true
end
if 30@ == RPC_SCRDISABLERACECHECKPOINT
then
23@ = false
0BE0: raknet hook_ret true
end
0BE0: raknet hook_ret true
:arzgo
if 0AB6: store_target_marker_coords_to 0@ 1@ 2@
then
if Actor.Driving($PLAYER_ACTOR)
then
print "~y~interaction w/: ~s~current car" 1500
18@ = false
31@ = true
cmdret
else
0B35: samp 4@ = get_last_command_params
if 0AD4: 5@ = scan_string 4@ format "%i" 4@
then
0AFF: samp 5@ = car_handle_by_samp_vehicle_id 4@
if 056E: car 5@ defined
then
printf "~y~interaction w/: ~s~%i" 1500 4@
18@ = false
31@ = true
cmdret
else
print "vehicle not found" 1500
cmdret
end
else
for 4@ = 0 to 2000
0AFF: samp 5@ = car_handle_by_samp_vehicle_id 4@
if 056E: car 5@ defined
then
print "~y~interaction w/: ~s~random" 1500
18@ = false
31@ = true
cmdret
else
if 4@ > 1999
then
print "vehicle not found" 1500
cmdret
end
end
end
end
end
else print "~r~marker not found" 1500
end
cmdret
:agom
if 23@ == true
then
if Actor.Driving($PLAYER_ACTOR)
then
print "~y~interaction w/: ~s~current car~n~" 1500
18@ = true
31@ = true
2@ -= 1.0
cmdret
else
0B35: samp 4@ = get_last_command_params
if 0AD4: 5@ = scan_string 4@ format "%i" 4@
then
0AFF: samp 5@ = car_handle_by_samp_vehicle_id 4@
if 056E: car 5@ defined
then
printf "~y~interaction w/: ~s~%i" 1500 4@
18@ = true
31@ = true
2@ -= 1.0
cmdret
else
print "vehicle not found" 1500
cmdret
end
else
for 4@ = 0 to 2000
0AFF: samp 5@ = car_handle_by_samp_vehicle_id 4@
if 056E: car 5@ defined
then
print "~y~interaction w/: ~s~random" 1500
18@ = true
31@ = true
cmdret
else
if 4@ > 1999
then
print "vehicle not found" 1500
cmdret
end
end
end
end
end
else print "~r~checkpoint not found" 1500
end
cmdret
:Quaternion_get
wait 0
0A96: 31@ = actor $PLAYER_ACTOR struct
0C0C: 30@ = struct 31@ offset 20 size 4 //matrix pointer
0C0C: 1@ = struct 30@ offset 0 size 4
0C0C: 2@ = struct 30@ offset 4 size 4
0C0C: 3@ = struct 30@ offset 8 size 4
0C0C: 4@ = struct 30@ offset 16 size 4
0C0C: 5@ = struct 30@ offset 20 size 4
0C0C: 6@ = struct 30@ offset 24 size 4
0C0C: 7@ = struct 30@ offset 32 size 4
0C0C: 8@ = struct 30@ offset 36 size 4
0C0C: 9@ = struct 30@ offset 40 size 4
005B: 10@ = 1@
005B: 10@ += 5@
005B: 10@ += 9@
if 0021: 10@ > 0.0
then
0007: 30@ = 0.5
000B: 10@ += 1.0
01FB: sqrt 10@ store_to 10@
0073: 30@ /= 10@ //s
0007: 15@ = 0.25
0073: 15@ /= 30@ //w
005B: 16@ = 8@ //x
0063: 16@ -= 6@
006B: 16@ *= 30@
005B: 17@ = 3@ //y
0063: 17@ -= 7@
006B: 17@ *= 30@
005B: 18@ = 4@ //z
0063: 18@ -= 2@
006B: 18@ *= 30@
else if and
0025: 1@ > 5@
0025: 1@ > 9@
then
0007: 30@ = 2.0
0007: 10@ = 1.0
005B: 10@ += 1@
0063: 10@ -= 5@
0063: 10@ -= 9@
01FB: sqrt 10@ store_to 10@
006B: 30@ *= 10@ //s
005B: 15@ = 8@ //w
0063: 15@ -= 6@
0073: 15@ /= 30@
0007: 16@ = 0.25 //x
006B: 16@ *= 30@
005B: 17@ = 2@
005B: 17@ += 4@
0073: 17@ /= 30@
005B: 18@ = 3@
005B: 18@ += 7@
0073: 18@ /= 30@
else if 0025: 5@ > 9@
then
0007: 30@ = 2.0
0007: 10@ = 1.0
005B: 10@ += 5@
0063: 10@ -= 1@
0063: 10@ -= 9@
01FB: sqrt 10@ store_to 10@
006B: 30@ *= 10@ //s
005B: 15@ = 3@ //w
0063: 15@ -= 7@
0073: 15@ /= 30@
005B: 16@ = 2@ //x
005B: 16@ += 4@
0073: 16@ /= 30@
0007: 17@ = 0.25 //y
006B: 17@ *= 30@
005B: 18@ = 6@ //z
005B: 18@ += 8@
0073: 18@ /= 30@
else
0007: 30@ = 2.0
0007: 10@ = 1.0
005B: 10@ += 9@
0063: 10@ -= 1@
0063: 10@ -= 5@
01FB: sqrt 10@ store_to 10@
006B: 30@ *= 10@ //s
005B: 15@ = 4@ //w
0063: 15@ -= 2@
0073: 15@ /= 30@
005B: 16@ = 3@ //x
005B: 16@ += 7@
0073: 16@ /= 30@
005B: 17@ = 6@ //y
005B: 17@ += 8@
0073: 17@ /= 30@
0007: 18@ = 0.25 //z
006B: 18@ *= 30@
end
end
end
0AB2: ret 4 15@ 16@ 17@ 18@
Последнее редактирование: