mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 04:06:06 +08:00
[bot] Implement/match n_GetMyPos(...)
* Implement/match `CNetGame::GetMyPos(...)`
This commit is contained in:
@ -238,6 +238,30 @@ BOOL CNetGame::IsVehicleAdded(VEHICLEID VehicleID)
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
//----------------------------------------------------
|
||||
PVECTOR CNetGame::GetMyPos(PVECTOR Vector)
|
||||
{
|
||||
if(byteState == PLAYER_STATE_ONFOOT)
|
||||
{
|
||||
Vector->X = ofSync.vecPos.X;
|
||||
Vector->Y = ofSync.vecPos.Y;
|
||||
Vector->Z = ofSync.vecPos.Z;
|
||||
return Vector;
|
||||
}
|
||||
else if(byteState == PLAYER_STATE_DRIVER)
|
||||
{
|
||||
Vector->X = icSync.vecPos.X;
|
||||
Vector->Y = icSync.vecPos.Y;
|
||||
Vector->Z = icSync.vecPos.Z;
|
||||
return Vector;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
void CNetGame::SetMyPos(PVECTOR Vector)
|
||||
{
|
||||
|
@ -115,6 +115,7 @@ public:
|
||||
BYTE GetPlayerArmour(PLAYERID playerId);
|
||||
BOOL GetPlayerKeys(PLAYERID playerId, WORD *udAnalog, WORD *lrAnalog, WORD *wKeys);
|
||||
BOOL IsVehicleAdded(VEHICLEID VehicleID);
|
||||
PVECTOR GetMyPos(PVECTOR Vector);
|
||||
void SetMyPos(PVECTOR Vector);
|
||||
float GetMyZAngle();
|
||||
|
||||
|
Reference in New Issue
Block a user