mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[bot] Implement ScrPutPlayerInVehicle(...)
This commit is contained in:
parent
6038cf0a59
commit
8b36c6d805
@ -42,6 +42,7 @@ char unnamed_3[1000][68];
|
||||
BYTE unnamed_8[MAX_PLAYERS];
|
||||
BOOL unnamed_7[MAX_VEHICLES];
|
||||
char unnamed_4[1000][63];
|
||||
BYTE byteMySeatID;
|
||||
|
||||
bool bSpawned = false;
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
using namespace RakNet;
|
||||
extern CNetGame* pNetGame;
|
||||
extern ONFOOT_SYNC_DATA ofSync;
|
||||
extern BYTE byteMySeatID;
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
@ -64,9 +65,27 @@ void ScrUnk0E(RPCParameters *rpcParams)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void ScrUnk46(RPCParameters *rpcParams)
|
||||
VEHICLEID MyVehicleID = INVALID_VEHICLE_ID;
|
||||
|
||||
void ScrPutPlayerInVehicle(RPCParameters *rpcParams)
|
||||
{
|
||||
// TODO: ScrUnk46
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
VEHICLEID vehicleid;
|
||||
BYTE seatid;
|
||||
|
||||
bsData.Read(vehicleid);
|
||||
bsData.Read(seatid);
|
||||
|
||||
MyVehicleID = vehicleid;
|
||||
byteMySeatID = seatid;
|
||||
|
||||
if(pNetGame->GetBotMode()) {
|
||||
pNetGame->GetBotMode()->OnNPCEnterVehicle(vehicleid, seatid);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
@ -469,8 +488,8 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk46);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk47);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrPutPlayerInVehicle);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk48);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
|
||||
@ -543,8 +562,8 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk47);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrPutPlayerInVehicle);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk48);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
|
||||
|
@ -130,8 +130,8 @@
|
||||
#define RPC_ScrSetPlayerPos "\x0C"
|
||||
#define RPC_ScrUnk0D "\x0D"
|
||||
#define RPC_ScrUnk0E "\x0E"
|
||||
#define RPC_ScrUnk46 "\x46"
|
||||
#define RPC_ScrUnk47 "\x47"
|
||||
#define RPC_ScrPutPlayerInVehicle "\x46"
|
||||
#define RPC_ScrUnk48 "\x48"
|
||||
#define RPC_ScrDisplayGameText "\x49"
|
||||
#define RPC_ScrUnk9C "\x9C"
|
||||
|
@ -57,8 +57,8 @@ void ScrUnk0B(RPCParameters *rpcParams) {}
|
||||
void ScrSetPlayerPos(RPCParameters *rpcParams) {}
|
||||
void ScrUnk0D(RPCParameters *rpcParams) {}
|
||||
void ScrUnk0E(RPCParameters *rpcParams) {}
|
||||
void ScrUnk46(RPCParameters *rpcParams) {}
|
||||
void ScrUnk47(RPCParameters *rpcParams) {}
|
||||
void ScrPutPlayerInVehicle(RPCParameters *rpcParams) {}
|
||||
void ScrUnk48(RPCParameters *rpcParams) {}
|
||||
void ScrDisplayGameText(RPCParameters *rpcParams) {}
|
||||
void ScrUnk9C(RPCParameters *rpcParams) {}
|
||||
@ -157,8 +157,8 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk46);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk47);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrPutPlayerInVehicle);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk48);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
|
||||
@ -265,8 +265,8 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk47);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrPutPlayerInVehicle);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk48);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
|
||||
|
Loading…
Reference in New Issue
Block a user