Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Extended vehicle rotation

 
  • 0 Vote(s) - 0 Average
Pawn Extended vehicle rotation
Otakeiro
Offline

Burgershot Member
Posts: 15
Threads: 7
Joined: Nov 2020
Reputation: 0
#1
2021-06-23, 08:01 PM (This post was last modified: 2021-06-23, 08:02 PM by Otakeiro.)
Is there any way to set/get the vehicle rotation like we do with objects?

Example:
  - SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ);
  - GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z);

Expectation:
  - SetVehicleRot(vehicleid, Float:RotX, Float:RotY, Float:RotZ);
  - GetVehicleRot(vehicleid, &Float:X, &Float:Y, &Float:Z);

I know that 3DTryg has this function but I reject the idea of adding an npc to do this, so any workaround or plugin that meets my expectations I would appreciate it if you share it!
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#2
2021-06-24, 11:12 AM (This post was last modified: 2021-06-24, 11:13 AM by Pinch.)
uh, this?
https://open.mp/docs/scripting/functions/GetVehicleRotationQuat

https://sampwiki.blast.hk/wiki/GetVehicleRotation
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
Leonardo
Offline

Burgershot Member
Posts: 17
Threads: 5
Joined: Nov 2020
Reputation: 3
#3
2021-06-26, 05:12 PM (This post was last modified: 2021-06-26, 05:16 PM by Leonardo.)
https://github.com/Leonardo541/matrix

Functions:
- GetVehicleRot
- SetVehicleRot

Functions in matrix_example.inc, requires amx_assembly and Pawn.RakNet. Compatible with v0.3.7-R2, v0.3.7-R3 and v0.3DL-R1.

Works with unoccupied vehicles and with driver / passengers. To work, there needs to be at least 2 players connected, but that is solved by creating 1 fake npc. Check matrix_example.inc and matrix_example2.pwn files.
My nickname in-game is: [L]3O
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode