mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[bot] Implement/match n_GetPlayerSpecialAction(...)
* Implement/match `CNetGame::GetPlayerSpecialAction(...)`
This commit is contained in:
parent
2703cfe7a5
commit
6ead220db3
@ -63,6 +63,8 @@ long GetTickCount();
|
|||||||
char* strlwr(char* str);
|
char* strlwr(char* str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SPECIAL_ACTION_NONE 0
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
typedef struct _PLAYER_SPAWN_INFO
|
typedef struct _PLAYER_SPAWN_INFO
|
||||||
{
|
{
|
||||||
|
@ -220,6 +220,18 @@ BOOL CNetGame::GetPlayerKeys(PLAYERID playerId, WORD *udAnalog, WORD *lrAnalog,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BYTE CNetGame::GetPlayerSpecialAction(PLAYERID playerId)
|
||||||
|
{
|
||||||
|
if(playerId >= MAX_PLAYERS) return SPECIAL_ACTION_NONE;
|
||||||
|
if(bPlayerSlotState[playerId] == FALSE) return SPECIAL_ACTION_NONE;
|
||||||
|
|
||||||
|
if(bytePlayerState[playerId] == PLAYER_STATE_ONFOOT)
|
||||||
|
{
|
||||||
|
return unnamed_3[playerId].byteSpecialAction;
|
||||||
|
}
|
||||||
|
return SPECIAL_ACTION_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
// MATCH
|
// MATCH
|
||||||
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
||||||
|
@ -111,6 +111,7 @@ public:
|
|||||||
BYTE GetPlayerHealth(PLAYERID playerId);
|
BYTE GetPlayerHealth(PLAYERID playerId);
|
||||||
BYTE GetPlayerArmour(PLAYERID playerId);
|
BYTE GetPlayerArmour(PLAYERID playerId);
|
||||||
BOOL GetPlayerKeys(PLAYERID playerId, WORD *udAnalog, WORD *lrAnalog, WORD *wKeys);
|
BOOL GetPlayerKeys(PLAYERID playerId, WORD *udAnalog, WORD *lrAnalog, WORD *wKeys);
|
||||||
|
BYTE GetPlayerSpecialAction(PLAYERID playerId);
|
||||||
BOOL IsPlayerAdded(PLAYERID playerId);
|
BOOL IsPlayerAdded(PLAYERID playerId);
|
||||||
BOOL IsVehicleAdded(VEHICLEID VehicleID);
|
BOOL IsVehicleAdded(VEHICLEID VehicleID);
|
||||||
PVECTOR GetMyPos(PVECTOR Vector);
|
PVECTOR GetMyPos(PVECTOR Vector);
|
||||||
|
@ -206,8 +206,11 @@ static cell AMX_NATIVE_CALL n_GetPlayerArmour(AMX *amx, cell *params)
|
|||||||
// native GetPlayerSpecialAction(playerid)
|
// native GetPlayerSpecialAction(playerid)
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerSpecialAction(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetPlayerSpecialAction(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: n_GetPlayerSpecialAction
|
if (pNetGame->GetPlayerPool()->GetSlotState((PLAYERID)params[1]))
|
||||||
return 0;
|
{
|
||||||
|
return (cell)pNetGame->GetPlayerSpecialAction((PLAYERID)params[1]);
|
||||||
|
}
|
||||||
|
return SPECIAL_ACTION_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// native IsPlayerStreamedIn(playerid)
|
// native IsPlayerStreamedIn(playerid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user