[Include] [INC] Smooth Rotate
#1

NOTE: This is a very old, very bad script. If anyone still finds this topic and wants to use it, you're better off using Shadow_Gengar's update to my script: http://pastebin.com/bTQHHGNg


Author:
Lavamike

Description:
Rotates an object pretty smoothly around (Rotates Float:Z)
This is my first release (I think?) so don't harass me if there's some bugs :P
At least I tried

Functions:
StartRotateObject(objectid);
StopRotateObject(objectid);

Tips:
Read The Readme File and/or look below


Quote:
Originally Posted by Readme.txt
Installing:

1. Extract "SRotate.inc" to your \server\pawno\include

2. Open up your script and add "#include <SRotate>" (without the quotes)
under your other #include's

3. Use the following new functions:
StartRotateObject(objectid);
StopRotateObject(objectid);



Notes:

1. Do NOT do a StartRotateObject on an object that is already rotating.

2. StopRotateObject only works one-by-one.
So if you have something like this:

pawn Code:
if (strcmp("/stoprotate", cmdtext, true, 10) == 0)
{
  StopRotateObject(17);
  StopRotateObject(18);
  StopRotateObject(19);
  StopRotateObject(20);
  return 1;
}
Only objectid 17 will stop. the others won't.



-- Monday, November 3rd 2008
Download:

http://www.sendspace.com/file/hzm11f (Sendspace [Recommended])
http://pawn.pastebin.com/f3d0e26e9 (Pastebin [Messes up indentation])
Reply
#2

Quote:
Originally Posted by Seif_
Wow, the script is so huge, while it could have been done in 1 function instead of 50+. But it's great. Good job.
Lol it was 76 publics :P

And I don't know how to do it in 1 function so

I've only been scripting for a few months so i'm good at some things but new at other things
Reply
#3

Nice but you can just do 1 repeating timer and do +5 everytime

Reply
#4

Quote:
Originally Posted by JaTochNietDan
Nice but you can just do 1 repeating timer and do +5 everytime

Oh yeah, XD



Maybe I will make a second version that's...smaller lol
Reply
#5

nice inc
Reply
#6

Good , but can be used for a car ? Like in shop's car is rotating...
Reply
#7

Nice INC.

@ Gecatahh -

No.
Reply
#8

Quote:
Originally Posted by Seif_
Wow, the script is so huge, while it could have been done in 1 function instead of 50+. But it's great. Good job.
Lol.

Nice job :P
Reply
#9

wen i start my samp-server.exe it says that it exists and it says starting rot ect ect then samp-server crashes why??
Reply
#10

Quote:
Originally Posted by gecatahh
View Post
Good , but can be used for a car ? Like in shop's car is rotating...
put the car on a rotating platform!
Reply
#11

Nice (except all those callbacks), but I know another one that's better (sorry):
[ame]http://www.youtube.com/watch?v=td-p2GObJxI[/ame]
Topic: https://sampforum.blast.hk/showthread.php?tid=151452&langid=6
He supports all the rotations (X,Y & Z) and he doesn't use so much callbacks :P
That script: http://pastebin.com/E1yrn6aW - As you can see, it's much shorter, and it can do more :P.
But your script is nice anyways
Reply
#12

Quote:
Originally Posted by JaTochNietDan
View Post
Nice but you can just do 1 repeating timer and do +5 everytime

Agreed. Otherwise, all you're doing is providing lag to the server members.
Reply
#13

http://pastebin.com/bTQHHGNg

Here's a huge update. Now the script got's only 47 lines. :P
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)