
20.01.2016, 10:29
|
|
Участник форума
Регистрация: 04.02.2014
Сообщений: 104
С нами:
6456767
Репутация:
68
|
|
[QUOTE="Woofing Giraffe"]
C++:
Код:
void
EmulKey
(
int
KeyId
)
{
stOnFootData sync
;
memset
(
&
sync
,
0
,
sizeof
(
stOnFootData
)
)
;
sync
=
SF
->
getSAMP
(
)
->
getPlayers
(
)
->
pLocalPlayer
->
onFootData
;
sync
.
byteCurrentWeapon
=
KeyId
;
BitStream bsActorSync
;
bsActorSync
.
Write
(
(
BYTE
)
ID_PLAYER_SYNC
)
;
bsActorSync
.
Write
(
(
PCHAR
)
&
sync
,
sizeof
(
stOnFootData
)
)
;
SF
->
getRakNet
(
)
->
SendPacket
(
&
bsActorSync
)
;
memset
(
&
bsActorSync
,
0
,
sizeof
(
BitStream
)
)
;
sync
.
byteCurrentWeapon
=
0
;
bsActorSync
.
Write
(
(
BYTE
)
ID_PLAYER_SYNC
)
;
bsActorSync
.
Write
(
(
PCHAR
)
&
sync
,
sizeof
(
stOnFootData
)
)
;
SF
->
getRakNet
(
)
->
SendPacket
(
&
bsActorSync
)
;
}
И в мэин
C++:
[CODE]
for
(
int
i
=
0
;
i
|
|
|