mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 01:38:17 +08:00
[bot] Implement/match n_GetPlayerKeys(...)
* Implement/match `CNetGame::GetPlayerKeys(...)`
This commit is contained in:
1 parent
71204c1c49
commit
148efc2fa6
3 files changed
+48
-1
No files matched your search
+15
-1
@@ -231,7 +231,21 @@ static cell AMX_NATIVE_CALL n_IsVehicleStreamedIn(AMX *amx, cell *params)
|
||||
// native GetPlayerKeys(playerid, &keys, &updown, &leftright)
|
||||
static cell AMX_NATIVE_CALL n_GetPlayerKeys(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: n_GetPlayerKeys
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
WORD wKeys=0, udAnalog=0, lrAnalog=0;
|
||||
|
||||
if(pPlayerPool->GetSlotState((PLAYERID)params[1]) &&
|
||||
pNetGame->GetPlayerKeys((PLAYERID)params[1], &udAnalog, &lrAnalog, &wKeys))
|
||||
{
|
||||
cell* cptr;
|
||||
amx_GetAddr(amx, params[2], &cptr);
|
||||
*cptr = (cell)wKeys;
|
||||
amx_GetAddr(amx, params[3], &cptr);
|
||||
*cptr = (short)udAnalog;
|
||||
amx_GetAddr(amx, params[4], &cptr);
|
||||
*cptr = (short)lrAnalog;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user