mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 19:53:04 +08:00
[saco] Implement/match ScrUnk16; it is the give-weapon RPC and calls CPlayerPed::GiveWeapon
This commit is contained in:
+14
-1
@@ -316,7 +316,20 @@ void ScrSetPlayerFacingAngle(RPCParameters *rpcParams)
|
||||
|
||||
pGame->FindPlayerPed()->ForceTargetRotation(fAngle);
|
||||
}
|
||||
void ScrUnk16(RPCParameters *rpcParams) {}
|
||||
void ScrUnk16(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
int iWeapon, iAmmo;
|
||||
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
bsData.Read(iWeapon);
|
||||
bsData.Read(iAmmo);
|
||||
|
||||
pNetGame->GetPlayerPool()->GetLocalPlayer()->GetPlayerPed()->GiveWeapon(iWeapon, iAmmo);
|
||||
}
|
||||
void ScrUnk40(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
|
||||
Reference in New Issue
Block a user