Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3.  
  4.  
  5.  
  6. new Plane;
  7. new Banshee;
  8. new sometimer;
  9. public OnFilterScriptInit()
  10. {
  11. Plane = CreateObject(-2435,0.0,0.0,0.0,0.0,0.0,0.0,7.0);
  12. Banshee = CreateVehicle(429,0.0,0.0,0.0,0.0,0,3,-1,0);
  13. sometimer = SetTimer("fixxedupdate",1000,false);//
  14. colorplane();
  15. return 1;
  16. }
  17. public OnFilterScriptExit()
  18. {
  19. DestroyObject(Plane);
  20. DestroyVehicle(Banshee);
  21. KillTimer(sometimer);
  22. return 1;
  23. }
  24. public OnPlayerCommandText(playerid, cmdtext[])
  25. {
  26. if (strcmp(cmdtext, "/banshee", true)==0)
  27. {
  28. new Float:nabpos[3];
  29. GetPlayerPos(playerid,nabpos[0],nabpos[1],nabpos[2]);
  30. SetVehiclePos(Banshee,nabpos[0] + 2.0,nabpos[1] + 2.0,nabpos[2] + 2.0);
  31. return 1;
  32. }
  33. else if (strcmp(cmdtext, "/checkcol", true)==0)
  34. {
  35. // IsCameraOK(playerid);
  36. return 1;
  37. }
  38. else if (strcmp(cmdtext, "/planehere", true)==0)
  39. {
  40. new Float:mypos[3];
  41. GetPlayerPos(playerid,mypos[0],mypos[1],mypos[2]);
  42. SetObjectPos(Plane,mypos[0],mypos[1],mypos[2] -1.0);//my old eyes
  43. SetObjectRot(Plane,0.0,90.0,0.0);
  44. return 1;
  45. }
  46.  
  47. return 0;
  48. }
  49. ////////////////RotateTheThing////////////////////////////////////////////////////////////////
  50. forward fixxedupdate();
  51. public fixxedupdate()
  52. {
  53. //for loop about players
  54. for(new i; i < MAX_PLAYERS; i++)
  55. {
  56. // IsCameraOK(i);//its perfect fuck off it will return or it wont ahahahahahhaah xD
  57. }
  58. return 1;
  59. }
  60. forward colorplane();
  61. public colorplane()
  62. {
  63. SetObjectMaterial(Plane, 0, 10817, "airportgnd_sfse", "black64", 0);
  64. AttachObjectToVehicle(Plane,Banshee,0.0,0.0,-4.34,0.0,0.0,0.0);//ry 90
  65. return 1;
  66. }
  67. /*
  68. stock IsCameraOK(playerid)//my life is just another obj
  69. {
  70. new line[128];
  71. new Float:startRay[3];
  72. new Float:endRay[3];
  73. new Float:colisionPos[3];//yep this is colision position , see
  74. GetPlayerCameraPos(playerid,startRay[0],startRay[1],startRay[2]);
  75.  
  76. endRay[0] = startRay[0];
  77. endRay[1] = startRay[1];
  78. endRay[2] = startRay[2] - 100.0;
  79. CA_RayCastLineID(startRay[0],startRay[1],startRay[2],endRay[0],endRay[1],endRay[2], colisionPos[0], colisionPos[1], colisionPos[2]);//raycast down
  80.  
  81. if(endRay[2] != startRay[2] - 100.0)
  82. // if(colisionPos[2] == endRay[2] )
  83. {
  84. format(line, sizeof(line), "myendRay[0] = %f ,endRay[1] = %f ,endRay[2] = %f ", endRay[0],endRay[1],endRay[2]);
  85. SendClientMessage(playerid,0xFF0066FF,line);
  86. SendClientMessage(playerid,0x66CC99FF,"your ok..");
  87. return 1;
  88. }
  89. else
  90. {
  91. format(line, sizeof(line), "myendRay[0] = %f ,endRay[1] = %f ,endRay[2] = %f ", endRay[0],endRay[1],endRay[2]);
  92. SendClientMessage(playerid,0xFF0066FF,line);
  93. SendClientMessage(playerid,0x66CC99FF,"BLIND THIS MAN");
  94. }
  95. return 0;//false
  96. }
  97. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement