diff --git a/bot/scrcustom.cpp b/bot/scrcustom.cpp index e1891b6..fe6adc5 100644 --- a/bot/scrcustom.cpp +++ b/bot/scrcustom.cpp @@ -260,6 +260,18 @@ static cell AMX_NATIVE_CALL n_GetPlayerKeys(AMX *amx, cell *params) return 0; } +// native GetPlayerFacingAngle(playerid,&Float:ang); +static cell AMX_NATIVE_CALL n_GetPlayerFacingAngle(AMX *amx, cell *params) +{ + if(!pNetGame->GetPlayerPool()->GetSlotState((PLAYERID)params[1])) return 0; + + cell* cptr; + amx_GetAddr(amx, params[2], &cptr); + float fZAngle = pNetGame->GetPlayerFacingAngle((PLAYERID)params[1]); + *cptr = amx_ftoc(fZAngle); + + return 1; +} // native GetMyPos(&Float:x, &Float:y, &Float:z) static cell AMX_NATIVE_CALL n_GetMyPos(AMX *amx, cell *params)