Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Texture Studio doors not opening

 
  • 0 Vote(s) - 0 Average
Pawn Texture Studio doors not opening
Kevinas
Offline

Burgershot Member
Posts: 7
Threads: 3
Joined: Feb 2021
Reputation: 0
#1
2021-03-05, 07:30 AM (This post was last modified: 2021-03-05, 08:03 AM by Kevinas.)
When I rotate a door it rotates visually, but it's axis doesn't change and stays in the same position, so whenever I rotate a door it opens and closes in the same spots as before, has anyone ever encountered this?

EDIT: sorry, wrong thread
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#2
2021-03-05, 08:38 AM (This post was last modified: 2021-03-05, 08:38 AM by Radical.)
Use this function to rotate a object.
PHP Code:
stock RotateObject(objectid, Float:rotX, Float:rotY, Float:rotZ, Float:Speed)
{
    new Float:X, Float:Y, Float:Z, Float:SpeedConverted = floatmul(Speed, 0.01);
    GetObjectPos(objectid, X, Y, Z);
    SetObjectPos(objectid, X, Y, floatadd(Z, 0.01));
    MoveObject(objectid, X, Y, floatsub(Z, 0.01), SpeedConverted, rotX, rotY, rotZ);
    return 1;
} 
« 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