Guest User

Midostream.inc

a guest
Apr 21st, 2011
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.31 KB | None | 0 0
  1. //========================================================//
  2. //=============[MidoStream - Object Streamer]=============//
  3. //=====================[by MidoBan]=======================//
  4.  
  5. /*
  6.     functions:
  7.         CreateStreamObject(modelid,Float:xpos,Float:ypos,Float:zpos,Float:xrot,Float:yrot,Float:zrot,Float:viewdist) - Create a streamed object
  8.         DestroyStreamObject(id) - Destroy a streamed object
  9.         GetStreamObjectPos(id,&Float:xpos,&Float:ypos,&Float:zpos) - Get the position of a streamed object
  10.         GetStreamObjectRot(id,&Float:xrot,&Float:yrot,&Float:zrot) - Get the rotation of a streamed object
  11.         SetStreamObjectPos(id,Float:xpos,Float:ypos,Float:zpos) - Set the position of a streamed object
  12.         SetStreamObjectRot(id,Float:xrot,Float:yrot,Float:zrot) - Set the rotation of a streamed object
  13.                 AttachStreamObjectToPlayer(id,playerid,Float:xoff,Float:yoff,Float:zoff,Float:xrot,Float:yrot,Float:zrot) - Attach a streamed object to a player
  14.                 MoveStreamObject(id2,Float:movx,Float:movy,Float:movz,Float:speed) - Move a streamed object
  15.                 MidoStreamDisconnect(playerid) - Goes under OnPlayerDisconnect
  16. */
  17.  
  18. #include <a_samp>
  19.  
  20. //----------------------------------------------------------
  21. stock CreateStreamObject(modelid,Float:xpos,Float:ypos,Float:zpos,Float:xrot,Float:yrot,Float:zrot,Float:viewdist)
  22. {
  23.     return CallRemoteFunction("Core_CreateStreamObject","ifffffff",modelid,xpos,ypos,zpos,xrot,yrot,zrot,viewdist);
  24. }
  25.  
  26. //----------------------------------------------------------
  27. stock DestroyStreamObject(id)
  28. {
  29.     CallRemoteFunction("Core_DestroyStreamObject","i",id);
  30. }
  31.  
  32. //----------------------------------------------------------
  33. stock GetStreamObjectPos(id,&Float:xpos,&Float:ypos,&Float:zpos)
  34. {
  35.     xpos = Float:CallRemoteFunction("Core_GetXPos","i",id);
  36.     ypos = Float:CallRemoteFunction("Core_GetYPos","i",id);
  37.     zpos = Float:CallRemoteFunction("Core_GetZPos","i",id);
  38. }
  39.  
  40. //----------------------------------------------------------
  41. stock GetStreamObjectRot(id,&Float:xrot,&Float:yrot,&Float:zrot)
  42. {
  43.     xrot = Float:CallRemoteFunction("Core_GetXRot","i",id);
  44.     yrot = Float:CallRemoteFunction("Core_GetYRot","i",id);
  45.     zrot = Float:CallRemoteFunction("Core_GetZRot","i",id);
  46. }
  47.  
  48. //----------------------------------------------------------
  49. stock SetStreamObjectPos(id,Float:xpos,Float:ypos,Float:zpos)
  50. {
  51.     CallRemoteFunction("Core_SetStreamObjectPos","ifff",id,xpos,ypos,zpos);
  52. }
  53.  
  54. //----------------------------------------------------------
  55. stock SetStreamObjectRot(id,Float:xrot,Float:yrot,Float:zrot)
  56. {
  57.     CallRemoteFunction("Core_SetStreamObjectRot","ifff",id,xrot,yrot,zrot);
  58. }
  59.  
  60. //----------------------------------------------------------
  61. stock AttachStreamObjectToPlayer(id,playerid,Float:xoff,Float:yoff,Float:zoff,Float:xrot,Float:yrot,Float:zrot)
  62. {
  63.     CallRemoteFunction("Core_AttachStreamObjectToPlayer","iiffffff",id,playerid,xoff,yoff,zoff,xrot,yrot,zrot);
  64. }
  65.  
  66. //----------------------------------------------------------
  67. stock MoveStreamObject(id,Float:movx,Float:movy,Float:movz,Float:speed)
  68. {
  69.     CallRemoteFunction("Core_MoveStreamObject","iffff",id,movx,movy,movz,speed);
  70. }
  71.  
  72.  
  73. //----------------------------------------------------------
  74. stock MidoStreamDisconnect(playerid)
  75. {
  76.     CallRemoteFunction("Core_MidoStreamDisconnect","i",playerid);
  77. }
Add Comment
Please, Sign In to add comment