Code Monkey home page Code Monkey logo

samp-packet-list's Introduction

Packet List

A list with SA-MP's packets documented. Check out the wiki.

If you have any question or something is wrong in the list, open an issue.

Updated on: 22nd April, 2024

samp-packet-list's People

Contributors

agraber avatar amyrahmady avatar brunoo16 avatar nexiustailer avatar nobody23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samp-packet-list's Issues

Packages are deprecated

Why does the server respond with completely different packets that are not here. And he does not unsubscribe to the packages that are here.

Addition for driver sync

At the end of driver sync now we have FLOAT train_speed.
But actually it's not just train speed. I'd rather name it ExtraData
It can contain following values in it's 32 bits:

  • FLOAT Train Speed for train
  • FLOAT Bike Incline for bikes
  • Uint16+Uint16 Hydra Thrust Angle (It seems that only first is useful, but second is not always zero).

Hydra thrust can be found here:
https://github.com/IllidanS4/YSF/blob/0a454418db50b5be14fcd75b4370599170cf9fdd/src/Structs.h#L331
https://github.com/IllidanS4/YSF/blob/c15389a39d3d20d26711704f66c7a6652a2f5e4e/src/natives/players.cpp#L509

Info about the unknown parameter in ServerJoin - ID: 137

The unknown parameter on the RPC ServerJoin - ID: 137
Is UINT32 not INT32
And is the player color, same as in SetPlayerColor - ID: 72

It is used when player joins the server and there are already players on the server, then the server sends the ServerJoin of each player (with their colors and names) to the new player.

If the value is "0" then the color will be random on each client.

Rpc scanner

Hello! Când You Tell me how do You scanned this rpcs please?
Thank You!

Question

How will you know the RPC ID?
You can find out the RPC for the function getPlayerVersion?

Wrong type of wListItem in RPC SendDialogResponse

SendDialogResponse have wListItem parameter with the type UINT16, but listitem wich passed in public OnDialogResponse can have negative values (-1 if the responsed dialog isn't in the style list), while UINT16 in this case will have 65535.

Incorrect information for RPC 115 (GiveTakeDamage)

This information about bGiveOrTake is wrong:

Additional Information: if bGiveOrTake is false, wPlayerID will receive the damage. If bGiveOrTake is true, wPlayerID will send the damage.

'bGiveOrTake' with false value indicates that the player is sending the damage (Give it)
'bGiveOrTake' with true value indicates that the player is receiving the damage (Take it), not vise-versa as it is now.

RPC 44 doubt

Hi, I was getting Outcoming RPC 44 params, but when I got AttachVehicle ID (65535), it was greater than 2000 (Max vehicle id).
Do you know how I could get 0-2000 Vehicle ID?

Outcoming RPC 19

Hi!

Found missing Outcoming RPC SetPlayerFacingAngle. ID - 19.

Parameters: FLOAT angle

ShowTextDraw szTextLen, flags, global vs player

  • szTextLen is typed as UINT8 but it's a UINT16
  • Here are some values of the Flags field:
    • bit 1: box on/off
    • bit 2: align left
    • bit 3: align center
    • bit 4: align right
    • bit 5: proportional font on/off
  • Might be worthwhile to note that global textdraws use id 0-2047 and per-player use id 2048-2303

Good sources of possible right discovered RPC IDs

  1. There is a good source with RPC and packets parameters (but it's client-side thing), that can be useful for you to check and maybe improve some information in this wiki. I'm talking about "moonloader" and "SAMP.Lua" tools which includes such useful files (after its installation in game folder) in GTA San Andreas/moonloader/lib/samp/events.lua

  2. I think more RPCs can be found even in such places (and there is still some ones that isn't presented in wiki, like RPC_ScmEvent or RPC_DestroyPickup, so will be also helpful I hope):
    https://github.com/IllidanS4/YSF/blob/master/src/RPCs.h#L64
    https://github.com/oscar-broman/SKY/blob/master/src/RPCs.cpp#L12

  3. Pretty old, but it has really many RPC ids so can be also helpful:
    https://gitlab.com/blasthack/raksamp/blob/master/raknet/SAMP/SAMPRPC.cpp

Bug in RPC 153

Now in SetPlayerSkin - ID: 153 we have following parameters: UINT16 wPlayerID, UINT32 dSkinID
But there's 2 more bytes between playerID and skinID actually.

As I saw in SAMP 0.3DL Compability solution, playerId is processing like UINT32 there, so those 2 bytes are added to player ID:
https://github.com/AGraber/samp-dl-compat/blob/bc4e2676b95a5f4dc62e99e63dc37b08718dfea9/dl-compat.inc#L113

I'd rather say that there's UINT16 UnknownParameter after PlayerID to let PlayerID be UINT16 as it is in the other RPCs.

.

.

Wrong order in 168

Hi, guys!

Nice to see new RPC OnCameraTarget - 168.
I've found that PlayerTarget and ObjectTarget are mixed up in places.
First one should be ObjectTarget and third one is PlayerTarget

Missing some RPCs from rpc list

Currently there are some missing outcoming RPCs, addition of which would be very useful:

  • SpawnPlayer
  • SetVehicleVelocity
  • SetVehicleAngularVelocity
  • AttachTrailerToVehicle
  • DetachTrailerFromVehicle
  • AddVehicleComponent (if there is an RPC to set it when vehicle is already created)
  • ChangeVehicleColor (if there is an RPC to set it when vehicle is already created)
  • ChangeVehiclePaintjob (if there is an RPC to set it when vehicle is already created)

Indicate alternative SA-MP native/callback names for each RPC

How about adding information to all RPCs about the names of the natives or publics which are their counterpart? At the moment, there is little uncertainty when some RPC are named DeathNotification (which doesn't give a direct understanding of which public is their analogue) or, for example, ScmEvent (which includes multiple purposes).

PutPlayerInvehicle

PutPlayerInVehicle - ID: 70
Parameters: UINT16 wVehicleID, UINT8 bSeatID

not UINT32

Outcoming RPCs 26 & 154

Hi!

There's RPC EnterVehicle - 26 and ExitVehicle - 154 in Incoming RPC list.
But there's no Outcoming versions of them.

So, it's PlayerEnterVehicle - 26

Parameters: UINT16 wPlayerID, UINT16 wVehicleID, UINT8 bIsPassenger

Additional Information: if bIsPassenger is 0, the player is about to enter the driver seat. If bIsPassenger is 1, the player is about to enter any of the passenger seats in the vehicle.

and PlayerExitVehicle - 154

Parameters: UINT16 wPlayerID, UINT16 wVehicleID

Incoming RPC 106

Hi!

You have 106 RPC in Outcoming section.
UpdateVehicleDamageStatus - ID: 106

Parameters: UINT16 wVehicleID, UINT32 panels, UINT32 doors, UINT8 lights, UINT8 tires

It also appears as incoming RPC when player makes damage to the vehicle.
Parameters are the same.

Make investigated argument types in Pawn.RakNet PR_ format

Since the main benefit of this wiki is for pawn scripters who need the packet arguments and their data types to access from Pawn.RakNet plugin, it would be wise to document them according to the types that are available in this plugin: PR_UINT8, PR_INT16, PR_FLOAT, PR_BITS etc.

Outcoming RPC, fix

For ApplyActorAnimation, ApplyPlayerAnimation in the parameters 2 times the variable fDelta is specified, this would be a good fix.

image

RPC ClientJoin - 25

Опечатка в - UINT32 uiClientChallengeResponse
Правильно - bool uiClientChallengeResponse

There is no Incoming Packet ID 12

The code:

const CONNECTION_REQUEST = 12
public OnIncomingPacket(playerid, packetid, BitStream:bs)
{
    printf("Packet ID: %i", packetid);
    return 1;
}

IPacket:CONNECTION_REQUEST(playerid, BitStream:bs)
{
    print("Connection request.");
    return 1;
}

Output:

Packet ID: 24
[connection] incoming connection: ip:port id: 0

CONNECTION_REQUEST incoming packet never print something but OnIncomingPacket callback print ID 24 so I think there is a mistake in packets, I don't know is this only one problem in packet list.

missing parameter

in 03dl for this package there is an additional custom skin id parameter after the skinid parameter

ShowActor - ID: 171

correct UINT16 wActorID, UINT32 SkinID, UINT32 CustomSkinID(0 if not there) , float X, float Y, float Z, float Angle, float Health, bool Invulnerable

incorrect UINT16 wActorID, UINT32 SkinID, float X, float Y, float Z, float Angle, float Health, bool Invulnerable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.