ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   ReplaceVehicleModel (https://forum.antichat.xyz/showthread.php?t=1439482)

taichi 06.07.2022 17:23

Как работать с ReplaceVehicleModel? Я отлавливаю RPC_ScrWorldVehicleAdd и мне нужно заменить все машины на Sultan.

Yuriy Code 05.08.2022 10:46

Привет.

Записываешь в битстрим в хуке:

C++:





Код:

bs
.
SetWriteOffset
(
16
)
;
bs
.
Write
(
(
int32
)
ид машины
)
;



Вот структура из евентов в луа:

Lua:





Код:

local
data
=
{
modSlots
=
{
}
}
local
vehicleId
=
bsread
.
uint16
(
bs
)
data
.
type
=
bsread
.
int32
(
bs
)
data
.
position
=
bsread
.
vector3d
(
bs
)
data
.
rotation
=
bsread
.
float
(
bs
)
data
.
bodyColor1
=
bsread
.
uint8
(
bs
)
data
.
bodyColor2
=
bsread
.
uint8
(
bs
)
data
.
health
=
bsread
.
float
(
bs
)
data
.
interiorId
=
bsread
.
uint8
(
bs
)
data
.
doorDamageStatus
=
bsread
.
int32
(
bs
)
data
.
panelDamageStatus
=
bsread
.
int32
(
bs
)
data
.
lightDamageStatus
=
bsread
.
uint8
(
bs
)
data
.
tireDamageStatus
=
bsread
.
uint8
(
bs
)
data
.
addSiren
=
bsread
.
uint8
(
bs
)
for
i
=
1
,
14
do
data
.
modSlots
[
i
]
=
bsread
.
uint8
(
bs
)
end
data
.
paintJob
=
bsread
.
uint8
(
bs
)
data
.
interiorColor1
=
bsread
.
int32
(
bs
)
data
.
interiorColor2
=
bsread
.
int32
(
bs
)



Время: 20:35