mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 01:38:17 +08:00
[bot] Implement/match n_GetMyPos(...)
* Implement/match `CNetGame::GetMyPos(...)`
This commit is contained in:
1 parent
8a4b1ed7a0
commit
72a7c19498
3 files changed
+40
-2
No files matched your search
+15
-2
@@ -249,11 +249,24 @@ static cell AMX_NATIVE_CALL n_GetPlayerKeys(AMX *amx, cell *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// native GetMyPos(&Float:x, &Float:y, &Float:z)
|
||||
static cell AMX_NATIVE_CALL n_GetMyPos(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: n_GetMyPos
|
||||
return 0;
|
||||
if(!pNetGame->GetPlayerPool()) return 0;
|
||||
|
||||
VECTOR vecPos;
|
||||
pNetGame->GetMyPos(&vecPos);
|
||||
|
||||
cell* cptr;
|
||||
amx_GetAddr(amx, params[1], &cptr);
|
||||
*cptr = amx_ftoc(vecPos.X);
|
||||
amx_GetAddr(amx, params[2], &cptr);
|
||||
*cptr = amx_ftoc(vecPos.Y);
|
||||
amx_GetAddr(amx, params[3], &cptr);
|
||||
*cptr = amx_ftoc(vecPos.Z);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// native SetMyPos(Float:x, Float:y, Float:z)
|
||||
|
||||
Reference in new issue
Block a user