1
0

MidoStream.inc 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //========================================================//
  2. //=============[MidoStream - Object Streamer]=============//
  3. //=====================[by MidoBan]=======================//
  4. /*
  5. functions:
  6. CreateStreamObject(modelid,Float:xpos,Float:ypos,Float:zpos,Float:xrot,Float:yrot,Float:zrot,Float:viewdist) - Create a streamed object
  7. DestroyStreamObject(id) - Destroy a streamed object
  8. GetStreamObjectPos(id,&Float:xpos,&Float:ypos,&Float:zpos) - Get the position of a streamed object
  9. GetStreamObjectRot(id,&Float:xrot,&Float:yrot,&Float:zrot) - Get the rotation of a streamed object
  10. SetStreamObjectPos(id,Float:xpos,Float:ypos,Float:zpos) - Set the position of a streamed object
  11. SetStreamObjectRot(id,Float:xrot,Float:yrot,Float:zrot) - Set the rotation of a streamed object
  12. AttachStreamObjectToPlayer(id,playerid,Float:xoff,Float:yoff,Float:zoff,Float:xrot,Float:yrot,Float:zrot) - Attach a streamed object to a player
  13. MoveStreamObject(id2,Float:movx,Float:movy,Float:movz,Float:speed) - Move a streamed object
  14. MidoStreamDisconnect(playerid) - Goes under OnPlayerDisconnect
  15. */
  16. #include <a_samp>
  17. //----------------------------------------------------------
  18. stock CreateStreamObject(modelid,Float:xpos,Float:ypos,Float:zpos,Float:xrot,Float:yrot,Float:zrot,Float:viewdist)
  19. {
  20. return CallRemoteFunction("Core_CreateStreamObject","ifffffff",modelid,xpos,ypos,zpos,xrot,yrot,zrot,viewdist);
  21. }
  22. //----------------------------------------------------------
  23. stock DestroyStreamObject(id)
  24. {
  25. CallRemoteFunction("Core_DestroyStreamObject","i",id);
  26. }
  27. //----------------------------------------------------------
  28. stock GetStreamObjectPos(id,&Float:xpos,&Float:ypos,&Float:zpos)
  29. {
  30. xpos = Float:CallRemoteFunction("Core_GetXPos","i",id);
  31. ypos = Float:CallRemoteFunction("Core_GetYPos","i",id);
  32. zpos = Float:CallRemoteFunction("Core_GetZPos","i",id);
  33. }
  34. //----------------------------------------------------------
  35. stock GetStreamObjectRot(id,&Float:xrot,&Float:yrot,&Float:zrot)
  36. {
  37. xrot = Float:CallRemoteFunction("Core_GetXRot","i",id);
  38. yrot = Float:CallRemoteFunction("Core_GetYRot","i",id);
  39. zrot = Float:CallRemoteFunction("Core_GetZRot","i",id);
  40. }
  41. //----------------------------------------------------------
  42. stock SetStreamObjectPos(id,Float:xpos,Float:ypos,Float:zpos)
  43. {
  44. CallRemoteFunction("Core_SetStreamObjectPos","ifff",id,xpos,ypos,zpos);
  45. }
  46. //----------------------------------------------------------
  47. stock SetStreamObjectRot(id,Float:xrot,Float:yrot,Float:zrot)
  48. {
  49. CallRemoteFunction("Core_SetStreamObjectRot","ifff",id,xrot,yrot,zrot);
  50. }
  51. //----------------------------------------------------------
  52. stock AttachStreamObjectToPlayer(id,playerid,Float:xoff,Float:yoff,Float:zoff,Float:xrot,Float:yrot,Float:zrot)
  53. {
  54. CallRemoteFunction("Core_AttachStreamObjectToPlayer","iiffffff",id,playerid,xoff,yoff,zoff,xrot,yrot,zrot);
  55. }
  56. //----------------------------------------------------------
  57. stock MoveStreamObject(id,Float:movx,Float:movy,Float:movz,Float:speed)
  58. {
  59. CallRemoteFunction("Core_MoveStreamObject","iffff",id,movx,movy,movz,speed);
  60. }
  61. //----------------------------------------------------------
  62. stock MidoStreamDisconnect(playerid)
  63. {
  64. CallRemoteFunction("Core_MidoStreamDisconnect","i",playerid);
  65. }