Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$Include includes\RakNetDefines.txt}
- /*
- SAMP SYNC:
- PASSENGER
- AIM
- TRAILER
- ONFOOT
- INCAR
- HEAD (future)
- SURF (future)
- DAMAGE(INCAR) (future)
- SPECTATE (future)
- UNOCCUPIED (future)
- */
- /*
- PASSENGERDATA, 11 ARGUMENTS
- */
- :PassengerData // size 0x18 byte
- 29@ = SAMP.GetSAMPPlayerIDByActorHandle($player_actor)
- 29@ = SAMP.GetPlayerStruct(29@)
- //0C0D: struct 29@ offset 0x0 size 0x2 = 0@ // VehicleID
- //0C0D: struct 29@ offset 0x2 size 0x1 = 1@ // SeatID
- //0C0D: struct 29@ offset 0x3 size 0x1 = 2@ // CurrentWeapon
- //0C0D: struct 29@ offset 0x4 size 0x1 = 3@ // Health
- //0C0D: struct 29@ offset 0x5 size 0x1 = 4@ // Armor
- //0C0D: struct 29@ offset 0x6 size 0x2 = 5@ // LeftRightKeys
- //0C0D: struct 29@ offset 0x8 size 0x2 = 6@ // UpDownKeys
- //0C0D: struct 29@ offset 0xA size 0x2 = 7@ // Keys
- //0C0D: struct 29@ offset 0xC size 0x4 = 8@ // PositionX
- //0C0D: struct 29@ offset 0x10 size 0x4 = 9@ // PositionY
- //0C0D: struct 29@ offset 0x14 size 0x4 = 10@ // PositionZ
- 30@ = RakNet.NewBitStream()
- RakNet.Write(30@, PACKET_PASSENGER_SYNC, BS_TYPE_BYTE, 1)
- RakNet.Write(30@, 29@, BS_TYPE_ARRAY, 0x18)
- RakNet.Send(30@, PRIORITY_HIGH, UNRELIABLE_SEQUENCED, 0)
- RakNet.DeleteBitStream(30@)
- 0AB2: return 0
- /*
- AIMDATA, 10 ARGUMENTS
- */
- :AimData // size 0x20 byte
- 29@ = SAMP.GetSAMPPlayerIDByActorHandle($player_actor)
- 29@ = SAMP.GetPlayerStruct(29@)
- 29@ += 0x18
- //0C0D: struct 29@ offset 0x0 size 0x1 = 0@ // CamMode
- //0C0D: struct 29@ offset 0x1 size 0x4 = 1@ // Aimf1X
- //0C0D: struct 29@ offset 0x5 size 0x4 = 2@ // Aimf1Y
- //0C0D: struct 29@ offset 0x9 size 0x4 = 3@ // Aimf1Z
- //0C0D: struct 29@ offset 0xD size 0x4 = 4@ // AimPosX
- //0C0D: struct 29@ offset 0x11 size 0x4 = 5@ // AimPosY
- //0C0D: struct 29@ offset 0x15 size 0x4 = 6@ // AimPosZ
- //0C0D: struct 29@ offset 0x19 size 0x4 = 7@ // AimZ
- //0C0D: struct 29@ offset 0x1D size 0x1 = 8@ // CamExtZoom
- //0C0D: struct 29@ offset 0x1E size 0x1 = 9@ // WeaponState
- 30@ = RakNet.NewBitStream()
- RakNet.Write(30@, PACKET_AIM_SYNC, BS_TYPE_BYTE, 1)
- RakNet.Write(30@, 29@, BS_TYPE_ARRAY, 0x20)
- RakNet.Send(30@, PRIORITY_HIGH, UNRELIABLE_SEQUENCED, 0)
- RakNet.DeleteBitStream(30@)
- 0AB2: return 0
- /*
- TRAILERDATA, 14 ARGUMENTS
- */
- :TrailerData // size 0x36 byte
- 29@ = SAMP.GetSAMPPlayerIDByActorHandle($player_actor)
- 29@ = SAMP.GetPlayerStruct(29@)
- 29@ += 0x18
- //0C0D: struct 29@ offset 0x0 size 0x2 = 0@ // TrailerID
- //0C0D: struct 29@ offset 0x2 size 0x4 = 1@ // DirectionX
- //0C0D: struct 29@ offset 0x6 size 0x4 = 2@ // DirectionY
- //0C0D: struct 29@ offset 0xA size 0x4 = 3@ // DirectionZ
- //0C0D: struct 29@ offset 0xE size 0x4 = 4@ // RollX
- //0C0D: struct 29@ offset 0x12 size 0x4 = 5@ // RollY
- //0C0D: struct 29@ offset 0x16 size 0x4 = 6@ // RollZ
- //0C0D: struct 29@ offset 0x1A size 0x4 = 7@ // PositionX
- //0C0D: struct 29@ offset 0x1E size 0x4 = 8@ // PositionY
- //0C0D: struct 29@ offset 0x22 size 0x4 = 9@ // PositionZ
- //0C0D: struct 29@ offset 0x26 size 0x4 = 10@ // SpeedX
- //0C0D: struct 29@ offset 0x2A size 0x4 = 11@ // SpeedY
- //0C0D: struct 29@ offset 0x2E size 0x4 = 12@ // SpeedZ
- //0C0D: struct 29@ offset 0x32 size 0x4 = 13@ // pad
- 30@ = RakNet.NewBitStream()
- RakNet.Write(30@, PACKET_TRAILER_SYNC, BS_TYPE_BYTE, 1)
- RakNet.Write(30@, 29@, BS_TYPE_ARRAY, 0x36)
- RakNet.Send(30@, PRIORITY_HIGH, UNRELIABLE_SEQUENCED, 0)
- RakNet.DeleteBitStream(30@)
- 0AB2: return 0
- /*
- ONFOOTDATA, 22 ARGUMENTS
- */
- :OnFootData // size 0x44 byte
- 29@ = SAMP.GetSAMPPlayerIDByActorHandle($player_actor)
- 29@ = SAMP.GetPlayerStruct(29@)
- 29@ += 0x6D
- //0C0D: struct 29@ offset 0x0 size 0x2 = 0@ // LeftRightKeys
- //0C0D: struct 29@ offset 0x2 size 0x2 = 1@ // UpDownKeys
- //0C0D: struct 29@ offset 0x4 size 0x2 = 2@ // Keys
- //0C0D: struct 29@ offset 0x6 size 0x4 = 3@ // PositionX
- //0C0D: struct 29@ offset 0xA size 0x4 = 4@ // PositionY
- //0C0D: struct 29@ offset 0xE size 0x4 = 5@ // PositionZ
- //0C0D: struct 29@ offset 0x12 size 0x4 = 6@ // Quaternion
- //0C0D: struct 29@ offset 0x16 size 0x4 = 7@ //
- //0C0D: struct 29@ offset 0x1A size 0x4 = 8@ //
- //0C0D: struct 29@ offset 0x1E size 0x4 = 9@ //
- //0C0D: struct 29@ offset 0x22 size 0x1 = 10@ // Health
- //0C0D: struct 29@ offset 0x23 size 0x1 = 11@ // Armor
- //0C0D: struct 29@ offset 0x24 size 0x1 = 12@ // CurrentWeapon
- //0C0D: struct 29@ offset 0x25 size 0x1 = 13@ // SpecialAction
- //0C0D: struct 29@ offset 0x26 size 0x4 = 14@ // MoveSpeedX
- //0C0D: struct 29@ offset 0x2A size 0x4 = 15@ // MoveSpeedY
- //0C0D: struct 29@ offset 0x2E size 0x4 = 16@ // MoveSpeedZ
- //0C0D: struct 29@ offset 0x32 size 0x4 = 17@ // SurfingOffsetsX
- //0C0D: struct 29@ offset 0x36 size 0x4 = 18@ // SurfingOffsetsY
- //0C0D: struct 29@ offset 0x3A size 0x4 = 19@ // SurfingOffsetsZ
- //0C0D: struct 29@ offset 0x3E size 0x2 = 20@ // SurfingVehicleID
- //0C0D: struct 29@ offset 0x40 size 0x4 = 21@ // CurrentAnimationID
- 30@ = RakNet.NewBitStream()
- RakNet.Write(30@, PACKET_PLAYER_SYNC, BS_TYPE_BYTE, 1)
- RakNet.Write(30@, 29@, BS_TYPE_ARRAY, 0x44)
- RakNet.Send(30@, PRIORITY_HIGH, UNRELIABLE_SEQUENCED, 0)
- RakNet.DeleteBitStream(30@)
- 0AB2: return 0
- /*
- INCARDATA, 22 ARGUMENTS
- */
- :InCarData // size 0x3F byte
- 29@ = SAMP.GetSAMPPlayerIDByActorHandle($player_actor)
- 29@ = SAMP.GetPlayerStruct(29@)
- 29@ += 0xB1
- //0C0D: struct 29@ offset 0 size 0x2 = 0@ // VehicleID
- //0C0D: struct 29@ offset 2 size 0x2 = 1@ // LeftRightKeys
- //0C0D: struct 29@ offset 4 size 0x2 = 2@ // UpDownKeys
- //0C0D: struct 29@ offset 6 size 0x2 = 3@ // Keys
- //0C0D: struct 29@ offset 8 size 0x4 = 4@ // Quaternion
- //0C0D: struct 29@ offset 12 size 0x4 = 5@ //
- //0C0D: struct 29@ offset 16 size 0x4 = 6@ //
- //0C0D: struct 29@ offset 20 size 0x4 = 7@ //
- //0C0D: struct 29@ offset 24 size 0x4 = 8@ // PositionX
- //0C0D: struct 29@ offset 28 size 0x4 = 9@ // PositionY
- //0C0D: struct 29@ offset 32 size 0x4 = 10@ // PositionZ
- //0C0D: struct 29@ offset 36 size 0x4 = 11@ // MoveSpeedX
- //0C0D: struct 29@ offset 40 size 0x4 = 12@ // MoveSpeedY
- //0C0D: struct 29@ offset 44 size 0x4 = 13@ // MoveSpeedZ
- //0C0D: struct 29@ offset 48 size 0x4 = 14@ // VehicleHealth
- //0C0D: struct 29@ offset 52 size 0x1 = 15@ // PlayerHealth
- //0C0D: struct 29@ offset 53 size 0x1 = 16@ // Armor
- //0C0D: struct 29@ offset 54 size 0x1 = 17@ // CurrentWeapon
- //0C0D: struct 29@ offset 55 size 0x1 = 18@ // Siren
- //0C0D: struct 29@ offset 56 size 0x1 = 19@ // LandingGearState
- //0C0D: struct 29@ offset 57 size 0x2 = 20@ // TrailerID
- //0C0D: struct 29@ offset 59 size 0x4 = 21@ // TrainSpeed
- 30@ = RakNet.NewBitStream()
- RakNet.Write(30@, PACKET_VEHICLE_SYNC, BS_TYPE_BYTE, 1)
- RakNet.Write(30@, 29@, BS_TYPE_ARRAY, 0x3F)
- RakNet.Send(30@, PRIORITY_HIGH, UNRELIABLE_SEQUENCED, 0)
- RakNet.DeleteBitStream(30@)
- 0AB2: return 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement