[Include] [INC]G_ObjectsRot - New objects functions!
#1

  • What is it?
    This is mi new include that has got 7 new functions. You can rotate objects (or create a rotation loop) like MoveObject function.
  • About
    - Version: 0.1
    - Last Update: 30/5/2010
    - Created by: Gantzyo
  • Functions
    pawn Код:
    - RotateObject(objectid,Float:rotX,Float:rotY,Float:rotZ,points,Float:speed);//rotX,rotY,rotZ is where have to rotate. Points is how many rotations positions will be between start rotation and end rotation
    - SetObjectRotationSpeed(objectid,Float:speed);//Change rotation speed if the object is rotating
    - StopRotatingObject(objectid);//Stop some object rotating
    - GenerateBucle(objectid,Float:offX,Float:offY,Float:offZ,Float:speed)//Creates a loop(rotation that never ends). offX,offY,offZ is how many will increase/decrease the rotation in X,Y,Z
    - StopBucle(objectid);//Stops the loop
    - OnObjectRotated(objectid);//Activates when RotateObject ends
    - OnObjectStopRotate(objectid);//Activates when use StopRotatingObject
    - OnObjectStopBucle(objectid);//Activates when use StopBucle
  • How to install
    1. Add in top of your script:
    pawn Код:
    #include <G_ObjectsRot>
    2. Add in end of your script:
    pawn Код:
    public OnObjectRotated(objectid)
    {
        return 1;
    }
    public OnObjectStopRotate(objectid)
    {
        return 1;
    }
    public OnObjectStopBucle(objectid)
    {
        return 1;
    }
  • Video
    [INC]G_ObjectsRot - SA-MP - New objects functions!
  • Bugs
    No bugs detected
  • Download
    - Include
    - Example code
    _________________________________________________
    I hope you like it
    Note: Bucle means Loop, I wrote it in my language and I forgot to change it. Maybe I'll reupload everything replacing Bucle by Loop
Reply
#2

Look's nice! I'll try it out later :P
Reply
#3

Nice, only if I had this before.
Reply
#4

perfect
Reply
#5

Nice idea, although you could've used MoveObject and OnObjectMoved as an alternative to timers.
Reply
#6

Quote:
Originally Posted by _Jay_
Nice idea, although you could've used MoveObject and OnObjectMoved as an alternative to timers.
No, because this script uses SetObjectRot and OnObjectMoved isn't activated with that function
Reply
#7

Hahah I can imagine wonderful things with that xD
Imagine 100 of Objects moving xDD

Nice idea and if this forum have reputations I will give you +100

Make more stuff like that!
Reply
#8

Very good.
It work on Incognito streamer?
Reply
#9

good work well done
Reply
#10

Do not go, say knows RotateObject !
Reply
#11

Quote:
Originally Posted by Aleks7
Very good.
It work on Incognito streamer?
Should, try it.
Reply
#12

Quote:
Originally Posted by Aleks7
Very good.
It work on Incognito streamer?
Yes, but you have to open the inc and change
pawn Код:
SetObjectRot
by
pawn Код:
SetDynamicObjectRot
And
pawn Код:
GetObjectRot
by
pawn Код:
GetDynamicObjectRot
Reply
#13

Amazing Sir. Now Gates in RP gms will look more realistic! Is it okay if i edit it for my own purposes? (not re-release) just easier coding
Reply
#14

Nice
Reply
#15

Quote:
Originally Posted by Tɧ϶ Tσηί™
Amazing Sir. Now Gates in RP gms will look more realistic! Is it okay if i edit it for my own purposes? (not re-release) just easier coding
I don't mind if you don't delete credits
Reply
#16

Please example RotateObject(objectid,Float:rotX,Float:rotY,Float: rotZ,points,Floatpeed);
How many points and speed need use ?
Reply
#17

Quote:
Originally Posted by Fro1sha
Please example RotateObject(objectid,Float:rotX,Float:rotY,Float: rotZ,points,Floatpeed);
How many points and speed need use ?
For example:
Actual rotZ = 0.0
New rotZ = 90.0
Points = 90(so rotZ will be 1.0,2.0,3.0,4.0... to 90.0) or 45(so rotZ will be 2.0,4.0,6.0,8.0... to 90.0) or 180(so rotZ will be 0.5,1.0,1.5,2.0... to 90.0) or any othe number, but if it's a multiplier of the new highest value, rotation will be more exatly.
Speed = Recomended not high to 50.0 and only edit Points.

I recommend to use the example script. Test this code in your server and change values for test points and speed:
Код:
/rotate 25 0.0 0.0 90.0 45 50.0
25 = Object ID that I used for test the loop in the video
0.0 = rotX increase
0.0 = rotY increase
90.0 = rot Z increase
90 = points
50.0 = Speed

You can use negative values too in that command.
Reply
#18

Timer 20 ms, not good . If many objects use rot, the server can hang from a timer
Reply
#19

Quote:
Originally Posted by Gantzyo
Quote:
Originally Posted by Tɧ϶ Tσηί™
Amazing Sir. Now Gates in RP gms will look more realistic! Is it okay if i edit it for my own purposes? (not re-release) just easier coding
I don't mind if you don't delete credits
Ok
Reply
#20

Sweet... I was working on one of my own but you just saved me time :] Thanks dude.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)