mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match ScrResetPlayerWeapons(...)
This commit is contained in:
parent
f1f9db0395
commit
5d75ee8a66
@ -146,8 +146,8 @@
|
||||
#define RPC_ScrUnk11 "\x11"
|
||||
#define RPC_ScrUnk12 "\x12"
|
||||
#define RPC_ScrSetPlayerFacingAngle "\x13"
|
||||
#define RPC_ScrUnk15 "\x15"
|
||||
#define RPC_ScrResetMoney "\x14"
|
||||
#define RPC_ScrResetPlayerWeapons "\x15"
|
||||
#define RPC_ScrUnk16 "\x16"
|
||||
#define RPC_ScrUnk40 "\x40"
|
||||
#define RPC_ScrUnk41 "\x41"
|
||||
|
@ -92,6 +92,8 @@ public:
|
||||
|
||||
void ResetAllSyncAttributes();
|
||||
|
||||
CPlayerPed * GetPlayerPed() { return m_pPlayerPed; };
|
||||
|
||||
void Say(PCHAR szText);
|
||||
|
||||
BOOL IsSpectating() { return m_bIsSpectating; };
|
||||
|
@ -75,7 +75,6 @@ void ScrUnk10(RPCParameters *rpcParams) {}
|
||||
void ScrUnk11(RPCParameters *rpcParams) {}
|
||||
void ScrUnk12(RPCParameters *rpcParams) {}
|
||||
void ScrSetPlayerFacingAngle(RPCParameters *rpcParams) {}
|
||||
void ScrUnk15(RPCParameters *rpcParams) {}
|
||||
void ScrUnk16(RPCParameters *rpcParams) {}
|
||||
void ScrUnk40(RPCParameters *rpcParams) {}
|
||||
void ScrUnk41(RPCParameters *rpcParams) {}
|
||||
@ -198,6 +197,18 @@ void ScrResetMoney(RPCParameters *rpcParams)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void ScrResetPlayerWeapons(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
CPlayerPed *pPlayerPed = pNetGame->GetPlayerPool()->GetLocalPlayer()->GetPlayerPed();
|
||||
pPlayerPed->ClearAllWeapons();
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void ScrForceSpawnSelection(RPCParameters *rpcParams)
|
||||
{
|
||||
pNetGame->GetPlayerPool()->GetLocalPlayer()->ReturnToClassSelection();
|
||||
@ -274,8 +285,8 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk11);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk12);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerFacingAngle);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk15);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrResetMoney);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrResetPlayerWeapons);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk16);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk40);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk41);
|
||||
@ -382,8 +393,8 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk11);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk12);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerFacingAngle);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk15);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrResetMoney);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrResetPlayerWeapons);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk16);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk40);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk41);
|
||||
|
Loading…
Reference in New Issue
Block a user