[Include] MidoStream - Flexible Object Streamer
#1

MidoStream - Object Streamer
By MidoBan
MidoStream is a new and flexible object streamer. I decided making a new object streamer because any of the other object streamers i found lacked lots of functions that are needed for managing all of the objects from within the streamer.
Therefore, many people used a streamer, and in addition, had some objects outside of the streamer.
The streamer has all the functions you need in order to manage all of your objects in it without exceptions.
It works in a method that none of the moving or attached objects will get out of synch.
The streamer can be used in multiple filterscripts as well.

The functions:
Код:
CreateStreamObject(modelid,Float:xpos,Float:ypos,Float:zpos,Float:xrot,Float:yrot,Float:zrot,Float:viewdist) - Create a streamed object
DestroyStreamObject(id) - Destroy a streamed object
GetStreamObjectPos(id,&Float:xpos,&Float:ypos,&Float:zpos) - Get the position of a streamed object
GetStreamObjectRot(id,&Float:xrot,&Float:yrot,&Float:zrot) - Get the rotation of a streamed object
SetStreamObjectPos(id,Float:xpos,Float:ypos,Float:zpos) - Set the position of a streamed object
SetStreamObjectRot(id,Float:xrot,Float:yrot,Float:zrot) - Set the rotation of a streamed object
AttachStreamObjectToPlayer(id,playerid,Float:xoff,Float:yoff,Float:zoff,Float:xrot,Float:yrot,Float:zrot) - Attach a streamed object to a player
MoveStreamObject(id,Float:movx,Float:movy,Float:movz,Float:speed) - Move a streamed object
MidoStreamDisconnect(playerid) - Goes under OnPlayerDisconnect
Usage:
The streamer functions are in the same format as the native pawn functions format.
Here is a usage demonstration of some of the streamer functions:

CreateStreamObject:
Like CreateObject, the ID of the CreateStreamObject can be also stored in a variable, for example:
pawn Код:
new obj;
obj = CreateStreamObject(971, 22.344, 6543.454, 34.556, 0.444, 6.000, 0.000, 200.0);
Of course you can also create an object regularly without assigning it to a variable:
pawn Код:
CreateStreamObject(971, 22.344, 6543.454, 34.556, 0.444, 6.000, 0.000, 200.0);
MoveStreamObject:
pawn Код:
MoveStreamObject(obj, 48.344, 6541.454, 34.556, 2.5);
AttachStreamObjectToPlayer:
pawn Код:
AttachStreamObjectToPlayer(obj, playerid, 2.5, 1.7, 1.0, 0.0, 0.0, 90.0);
Installation:
In order to use the streamer, all you need to do is:
  • Place MidoStream.inc in your includes folder
  • Place MidoStream.pwn in your filterscripts folder
  • Compile MidoStream.pwn
  • Put MidoStream in your server.cfg (before all the scripts that use MidoStream)
  • On The first script in your server.cfg or in a script where u have a working OnPlayerDisconnect function, put this:
    pawn Код:
    public OnPlayerDisconnect(playerid,reason)
    {
      MidoStreamDisconnect(playerid);
    }
  • Dont forget! Always change the #define MAX_STREAM_OBJECTS number on top of the MidoStream.pwn to the overall number of objects you got.
  • Thats it! now you can freely use all the functions above by putting #include <MidoStream> at the top of your script.
Known bugs:
  • SetStreamObjectRot is not working because SetPlayerObjectRot isn't a working function (untested in SA-MP 0.3).
  • AttachStreamObjectToPlayer is not working because AttachPlayerObjectToPlayer was removed in SA-MP 0.3.
I'll be happy to hear any comment/bug report in this topic.
Enjoy!

Download:
MidoStream v1.3 - New and improved!





Converters:
convertFFS
Server Hex

Change log:
15/6/08 - I removed some unused array, the only thing it'll do is reduce the size of the .amx, redownload to get the update (only the .pwn file changed, just replace it and compile). Recommended.

15/6/08 - The MoveStreamObject synch bug have been fixed. Everything works perfectly without any bugs. You can use it for any fast MoveObject scripts as you want. Redownload the latest bug free version (very important update!).

21/6/08 - Updated something regarding destroying objects while moving, and creating objects immediately after it. If you encountered a problem with it, redownload to get the update.

28/6/08 - MidoStream v1.1 - The MoveStreamObject synch part was significantly improved. It's highly recommended. Redownload to get the update!

2/7/08 - MidoStream v1.2 - I know it hasn't been a long time since v1.1 but there are two major updates that are improving the streamer's performance in a way that it can clearly be declared as a new version.
- The MoveStreamObject logic has been changed a lot, Its way more accurate and efficient at the same time. For the ones interested, look at the differences between v1.1 and v1.2.
- A function in the script has been improved (upgraded speed and efficiency - could even increase the object/lag limit) - Thanks to ******.
I recommend all of the streamer users to download in order to get even better performance.

22/9/09 - MidoStream v1.3 - Been a long time since the last version.. Added support in the GMX command (now the objects won't multiply after a GMX) and updated to the new SA-MP object limit - 254 objects per area.

29/9/09 - In order to prevent complications, i posted a SA-MP 0.2x version and a 0.3 one. The only difference is the 150 objects per area in the 0.2x and the 254 in the 0.3.

25/12/09 - Hi everyone, I'm almost sure i found the reason objects kept disappearing on you since the SA-MP 0.3 MidoStream version. It was a ridiculous typing mistake in the MidoStreamDisconnect function. I have no option to test it right now but i'm almost certain that it was the problem, download again and try. Post if it was solved.
Reply


Messages In This Thread
MidoStream - Flexible Object Streamer - by MidoBan - 14.06.2008, 21:02
Re: MidoStream - Object Streamer attach/move/create/destroy... - by yom - 14.06.2008, 21:58
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 06:21
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Zh3r0 - 15.06.2008, 06:37
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 06:45
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Amit_B - 15.06.2008, 07:10
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 07:23
Re: MidoStream - Object Streamer attach/move/create/destroy... - by cocakiller - 15.06.2008, 08:02
Re: MidoStream - Object Streamer attach/move/create/destroy... - by [IB]Scorcher - 15.06.2008, 08:07
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Yaheli_Faro - 15.06.2008, 08:07
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 08:22
Re: MidoStream - Object Streamer attach/move/create/destroy... - by TalBarami - 15.06.2008, 08:57
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Yaheli_Faro - 15.06.2008, 08:59
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Zh3r0 - 15.06.2008, 09:04
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Yaheli_Faro - 15.06.2008, 09:06
Re: MidoStream - Object Streamer attach/move/create/destroy... - by TalBarami - 15.06.2008, 09:52
Re: MidoStream - Object Streamer attach/move/create/destroy... - by NewB - 15.06.2008, 11:52
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 12:12
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Spike_VoiD - 15.06.2008, 12:32
Re: MidoStream - Object Streamer attach/move/create/destroy... - by cptnsausage - 15.06.2008, 12:40
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Slash991 - 15.06.2008, 13:19
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 13:49
Re: MidoStream - Object Streamer attach/move/create/destroy... - by blewert - 15.06.2008, 14:01
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 14:10
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 15.06.2008, 22:51
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Angelhj - 16.06.2008, 04:24
Re: MidoStream - Object Streamer attach/move/create/destroy... - by Float - 16.06.2008, 08:52
Re: MidoStream - Object Streamer attach/move/create/destroy... - by filipyoyo - 16.06.2008, 15:36
Re: MidoStream - Object Streamer attach/move/create/destroy... - by MidoBan - 16.06.2008, 18:58
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Float - 18.06.2008, 06:03
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 28.09.2008, 12:47
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 28.09.2008, 12:50
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Doktor - 28.09.2008, 16:45
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by julian_caka - 28.09.2008, 16:58
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Yaheli_Faro - 28.09.2008, 17:01
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by silvan - 29.09.2008, 06:36
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 04.10.2008, 01:25
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 04.10.2008, 01:30
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by OG BOBO - 04.10.2008, 06:53
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by silvan - 04.10.2008, 10:59
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by RyDeR` - 13.09.2009, 11:43
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Adil - 13.09.2009, 12:21
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by GiP_YossI - 13.09.2009, 17:36
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by XCultz - 13.09.2009, 17:38
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Mustafacc - 15.09.2009, 11:01
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Blokkmonsta - 20.09.2009, 19:33
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by On_Top_Non_Stop - 20.09.2009, 21:09
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 20.09.2009, 22:19
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by BP13 - 21.09.2009, 02:00
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 21.09.2009, 09:46
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 29.11.2009, 15:44
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by OverLord* - 29.11.2009, 16:19
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Mystique - 29.11.2009, 16:47
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by CracK - 29.11.2009, 17:04
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by MidoBan - 29.11.2009, 17:09
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Jeffry - 03.12.2009, 12:51
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by buonggiorno - 03.12.2009, 14:42
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by [XST]O_x - 03.12.2009, 14:53
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by member - 03.12.2009, 14:54
Re: MidoStream - Flexible Object Streamer attach/move/create/destroy... - by Cedimedi - 11.12.2009, 20:19
Re: MidoStream - Flexible Object Streamer - by Lorenc_ - 03.05.2010, 07:04
Re: MidoStream - Flexible Object Streamer - by neko_ceko - 03.05.2010, 12:59
Re: MidoStream - Flexible Object Streamer - by [SF]RobMob - 03.05.2010, 22:46
Re: MidoStream - Flexible Object Streamer - by Chilliad - 12.05.2010, 04:08
Re: MidoStream - Flexible Object Streamer - by thewarrior - 12.05.2010, 04:36
Re: MidoStream - Flexible Object Streamer - by Andy_McKinley - 22.05.2010, 21:21
Re: MidoStream - Flexible Object Streamer - by Cedimedi - 22.05.2010, 21:36
Re: MidoStream - Flexible Object Streamer - by zSuYaNw - 22.05.2010, 23:30
Re: MidoStream - Flexible Object Streamer - by BP13 - 23.05.2010, 00:58
Re: MidoStream - Flexible Object Streamer - by [SF]OutLawZ - 23.05.2010, 09:16
Re: MidoStream - Flexible Object Streamer - by titanak - 29.08.2010, 17:21
Re: MidoStream - Flexible Object Streamer - by sleepysnowflake - 10.11.2010, 11:14
Re: MidoStream - Flexible Object Streamer - by Brian_Furious - 10.11.2010, 11:39
Re: MidoStream - Flexible Object Streamer - by sleepysnowflake - 10.11.2010, 14:57
Re: MidoStream - Flexible Object Streamer - by SeQualX - 10.11.2010, 15:02
Re: MidoStream - Flexible Object Streamer - by Zh3r0 - 10.11.2010, 15:22
Re: MidoStream - Flexible Object Streamer - by SeQualX - 10.11.2010, 15:25
Re: MidoStream - Flexible Object Streamer - by Swat007forever - 01.01.2011, 18:44
Re: MidoStream - Flexible Object Streamer - by LastofHero - 05.01.2011, 07:43
Re: MidoStream - Flexible Object Streamer - by Stheam - 06.02.2011, 10:05
Re: MidoStream - Flexible Object Streamer - by GBLTeam - 10.04.2011, 13:04
Re: MidoStream - Flexible Object Streamer - by Gray - 10.04.2011, 13:12
Re: MidoStream - Flexible Object Streamer - by adios1 - 09.06.2011, 17:51
Re: MidoStream - Flexible Object Streamer - by Hunted...Killed - 26.09.2011, 21:30
Re: MidoStream - Flexible Object Streamer - by StreetGT - 09.10.2011, 19:55
Re: MidoStream - Flexible Object Streamer - by SA_Claude - 22.10.2011, 08:47
Re: MidoStream - Flexible Object Streamer - by denNorske - 28.04.2012, 21:41
Re: MidoStream - Flexible Object Streamer - by JaKe Elite - 16.09.2012, 11:13
Re: MidoStream - Flexible Object Streamer - by Plovix - 10.11.2012, 07:53
Re: MidoStream - Flexible Object Streamer - by NoahF - 10.11.2012, 10:53
Re: MidoStream - Flexible Object Streamer - by Wayland - 14.12.2013, 10:57
Re: MidoStream - Flexible Object Streamer - by newbie scripter - 14.12.2013, 10:59
Respuesta: MidoStream - Flexible Object Streamer - by jurgen - 21.02.2014, 16:14
Re: Respuesta: MidoStream - Flexible Object Streamer - by Riddy - 21.02.2014, 17:05

Forum Jump:


Users browsing this thread: 1 Guest(s)