[INC]G_ObjectsRot - New objects functions! -
Gantzyo - 30.05.2010
- 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:
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
Re: [INC]G_ObjectsRot - New objects functions! -
ViruZZzZ_ChiLLL - 30.05.2010
Look's nice!
I'll try it out later :P
Re: [INC]G_ObjectsRot - New objects functions! -
lolumadd - 30.05.2010
Nice, only if I had this before.
Re: [INC]G_ObjectsRot - New objects functions! -
¤Adas¤ - 30.05.2010
perfect
Re: [INC]G_ObjectsRot - New objects functions! -
Jay_ - 30.05.2010
Nice idea, although you could've used MoveObject and OnObjectMoved as an alternative to timers.
Re: [INC]G_ObjectsRot - New objects functions! -
Gantzyo - 30.05.2010
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
Re: [INC]G_ObjectsRot - New objects functions! -
Flashy - 30.05.2010
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!
Re: [INC]G_ObjectsRot - New objects functions! -
Aleks7 - 30.05.2010
Very good.
It work on Incognito streamer?
Re: [INC]G_ObjectsRot - New objects functions! -
Montis123 - 30.05.2010
good work well done
Re: [INC]G_ObjectsRot - New objects functions! -
eXtr1kE - 30.05.2010
Do not go, say knows RotateObject !
Re: [INC]G_ObjectsRot - New objects functions! -
Chaprnks - 30.05.2010
Quote:
Originally Posted by Aleks7
Very good.
It work on Incognito streamer?
|
Should, try it.
Re: [INC]G_ObjectsRot - New objects functions! -
Gantzyo - 30.05.2010
Quote:
Originally Posted by Aleks7
Very good.
It work on Incognito streamer?
|
Yes, but you have to open the inc and change
by
And
by
Re: [INC]G_ObjectsRot - New objects functions! -
Toni - 30.05.2010
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
Re: [INC]G_ObjectsRot - New objects functions! -
AirKite - 31.05.2010
Nice
Re: [INC]G_ObjectsRot - New objects functions! -
Gantzyo - 31.05.2010
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
Re: [INC]G_ObjectsRot - New objects functions! -
Fro1sha - 31.05.2010
Please example RotateObject(objectid,Float:rotX,Float:rotY,Float: rotZ,points,Float
peed);
How many points and speed need use ?
Re: [INC]G_ObjectsRot - New objects functions! -
Gantzyo - 31.05.2010
Quote:
Originally Posted by Fro1sha
Please example RotateObject(objectid,Float:rotX,Float:rotY,Float: rotZ,points,Float peed);
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.
Re: [INC]G_ObjectsRot - New objects functions! -
Fro1sha - 31.05.2010
Timer 20 ms, not good
. If many objects use rot, the server can hang from a timer
Re: [INC]G_ObjectsRot - New objects functions! -
Toni - 31.05.2010
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
Re: [INC]G_ObjectsRot - New objects functions! -
[NYRP]Mike. - 31.05.2010
Sweet... I was working on one of my own but you just saved me time :] Thanks dude.