Advertisement
Guest User

[vTc]Just for fun

a guest
Jul 27th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.65 KB | None | 0 0
  1. /*Haha :D Thanks for taking a look or using it on your server :)
  2. Its an easy FS non-useful :D but Only for FUN i created Just go in game and type /vtc and you will spawn AN
  3. Object (Go and see :D )
  4. ***********************************************BY [vTc]Team*****************************************
  5. */
  6.  
  7. #include <a_samp>
  8.  
  9. new HavingBall[MAX_PLAYERS];
  10. new Anim[MAX_PLAYERS];
  11. new Ball;
  12. new BallStatus;
  13. new Baller;
  14. new ShootingBall;
  15. new BallBounce;
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. Baller = 999;
  20. DestroyObject(Ball);
  21. Ball = CreateObject(2114, 2782.3027,-2019.0826,13.5547-0.8, 0, 0, 96);
  22. return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27. return 1;
  28. }
  29.  
  30. public OnObjectMoved(objectid)
  31. {
  32. new i = Baller;
  33. if(ShootingBall == 2)
  34. {
  35. BallDown2(i);
  36. return 1;
  37. }
  38. else if(ShootingBall == 3)
  39. {
  40. BallDown3(i);
  41. return 1;
  42. }
  43. else if(ShootingBall == 4)
  44. {
  45. BallDown4(i);
  46. return 1;
  47. }
  48. else if(ShootingBall == 5)
  49. {
  50. BallDown5(i);
  51. return 1;
  52. }
  53. else if(ShootingBall == 6)
  54. {
  55. ApplyAnimation(i,"BSKTBALL","BBALL_walk",4.1,1,1,1,1,1);
  56. HavingBall[i] = 1;
  57. Anim[i] = 0;
  58. }
  59. if(BallBounce == 1)
  60. {
  61. new Float:x, Float:y, Float:z;
  62. GetObjectPos(Ball, x, y, z);
  63. MoveObject(Ball, x, y, z+1.2, 4);
  64. BallBounce = 2;
  65. }
  66. else if(BallBounce == 2)
  67. {
  68. new Float:x, Float:y, Float:z;
  69. GetObjectPos(Ball, x, y, z);
  70. MoveObject(Ball, x, y, z-1.2, 4);
  71. BallBounce = 3;
  72. }
  73. else if(BallBounce == 3)
  74. {
  75. new Float:x, Float:y, Float:z;
  76. GetObjectPos(Ball, x, y, z);
  77. MoveObject(Ball, x, y, z+0.8, 3);
  78. BallBounce = 4;
  79. }
  80. else if(BallBounce == 4)
  81. {
  82. new Float:x, Float:y, Float:z;
  83. GetObjectPos(Ball, x, y, z);
  84. MoveObject(Ball, x, y, z-0.8, 3);
  85. BallBounce = 5;
  86. }
  87. else if(BallBounce == 5)
  88. {
  89. new Float:x, Float:y, Float:z;
  90. GetObjectPos(Ball, x, y, z);
  91. MoveObject(Ball, x, y, z+0.5, 2);
  92. BallBounce = 6;
  93. }
  94. else if(BallBounce == 6)
  95. {
  96. new Float:x, Float:y, Float:z;
  97. GetObjectPos(Ball, x, y, z);
  98. MoveObject(Ball, x, y, z-0.5, 2);
  99. BallBounce = 7;
  100. }
  101. else if(BallBounce == 7)
  102. {
  103. new Float:x, Float:y, Float:z;
  104. GetObjectPos(Ball, x, y, z);
  105. MoveObject(Ball, x, y, z+0.2, 1);
  106. BallBounce = 8;
  107. }
  108. else if(BallBounce == 8)
  109. {
  110. new Float:x, Float:y, Float:z;
  111. GetObjectPos(Ball, x, y, z);
  112. MoveObject(Ball, x, y, z-0.2, 1);
  113. BallBounce = 0;
  114. }
  115. if(!HavingBall[i]) return 1;
  116. new Keys, ud, lr;
  117. GetPlayerKeys(i, Keys, ud, lr);
  118. if(Anim[i])
  119. {
  120. switch(BallStatus)
  121. {
  122. case 0:
  123. {
  124. BallStatus = 1;
  125. new Float:x, Float:y, Float:z;
  126. GetPlayerPos(i, x, y, z);
  127. StopObject(Ball);
  128. new Float:x2, Float:y2;
  129. GetXYInFrontOfPlayer(i, x2, y2, 0.4);
  130. MoveObject(Ball, x2, y2, z+0.1, 5.5);
  131. }
  132. case 1:
  133. {
  134. BallStatus = 0;
  135. new Float:x, Float:y, Float:z;
  136. GetPlayerPos(i, x, y, z);
  137. StopObject(Ball);
  138. new Float:x2, Float:y2;
  139. GetXYInFrontOfPlayer(i, x2, y2, 0.4);
  140. MoveObject(Ball, x2, y2, z-0.8, 5.5);
  141. }
  142. }
  143. return 1;
  144. }
  145. if(Keys & KEY_SPRINT)
  146. {
  147. ApplyAnimation(i,"BSKTBALL","BBALL_run",4.1,1,1,1,1,1);
  148. switch(BallStatus)
  149. {
  150. case 0:
  151. {
  152. BallStatus = 1;
  153. new Float:x, Float:y, Float:z;
  154. GetPlayerPos(i, x, y, z);
  155. StopObject(Ball);
  156. new Float:x2, Float:y2;
  157. GetXYInFrontOfPlayer(i, x2, y2, 1.5);
  158. MoveObject(Ball, x2, y2, z+0.1, 8);
  159. }
  160. case 1:
  161. {
  162. BallStatus = 0;
  163. new Float:x, Float:y, Float:z;
  164. GetPlayerPos(i, x, y, z);
  165. StopObject(Ball);
  166. new Float:x2, Float:y2;
  167. GetXYInFrontOfPlayer(i, x2, y2, 1.5);
  168. MoveObject(Ball, x2, y2, z-0.8, 8);
  169. }
  170. }
  171. return 1;
  172. }
  173. else
  174. {
  175. ApplyAnimation(i,"BSKTBALL","BBALL_walk",4.1,1,1,1,1,1);
  176. }
  177. switch(BallStatus)
  178. {
  179. case 0:
  180. {
  181. BallStatus = 1;
  182. new Float:x, Float:y, Float:z;
  183. GetPlayerPos(i, x, y, z);
  184. StopObject(Ball);
  185. new Float:x2, Float:y2;
  186. GetXYInFrontOfPlayer(i, x2, y2, 1.2);
  187. MoveObject(Ball, x2, y2, z+0.1, 5);
  188. }
  189. case 1:
  190. {
  191. BallStatus = 0;
  192. new Float:x, Float:y, Float:z;
  193. GetPlayerPos(i, x, y, z);
  194. StopObject(Ball);
  195. new Float:x2, Float:y2;
  196. GetXYInFrontOfPlayer(i, x2, y2, 1.2);
  197. MoveObject(Ball, x2, y2, z-0.8, 5);
  198. }
  199. }
  200. return 1;
  201. }
  202.  
  203. public OnPlayerConnect(playerid)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnPlayerDisconnect(playerid, reason)
  209. {
  210. HavingBall[playerid] = 0;
  211. Anim[playerid] = 0;
  212. if(HavingBall[playerid]) Baller = 999;
  213. return 1;
  214. }
  215.  
  216. public OnPlayerSpawn(playerid)
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnPlayerDeath(playerid, killerid, reason)
  222. {
  223. HavingBall[playerid] = 0;
  224. if(HavingBall[playerid]) Baller = 999;
  225. return 1;
  226. }
  227.  
  228. public OnVehicleSpawn(vehicleid)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnVehicleDeath(vehicleid, killerid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnPlayerText(playerid, text[])
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnPlayerCommandText(playerid, cmdtext[])
  244. {
  245. if (strcmp("/vtc", cmdtext, true, 6) == 0)
  246. {
  247. new Float:x, Float:y, Float:z;
  248. GetPlayerPos(playerid, x, y, z);
  249. DestroyObject(Ball);
  250. Ball = CreateObject(2114, x+random(3), y+random(3), z-0.8, 0, 0, 96);
  251. return 1;
  252. }
  253. return 0;
  254. }
  255.  
  256. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  257. {
  258. if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK) && !IsPlayerInAnyVehicle(playerid))
  259. {
  260. if(HavingBall[playerid])
  261. {
  262. ApplyAnimation(playerid,"BSKTBALL","BBALL_idleloop",4.1,1,1,1,1,1);
  263. }
  264. else
  265. {
  266. ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
  267. }
  268. Anim[playerid] = 1;
  269. }
  270. if (!(newkeys & KEY_SECONDARY_ATTACK) && (oldkeys & KEY_SECONDARY_ATTACK) && !IsPlayerInAnyVehicle(playerid))
  271. {
  272. ClearAnimations(playerid);
  273. Anim[playerid] = 0;
  274. }
  275. if(newkeys & KEY_FIRE && !IsPlayerInAnyVehicle(playerid))
  276. {
  277. if(!HavingBall[playerid])
  278. {
  279. new Float:x, Float:y, Float:z;
  280. GetObjectPos(Ball, x, y, z);
  281. if(IsPlayerInRangeOfPoint(playerid, 1.5, x, y, z))
  282. {
  283. HavingBall[playerid] = 1;
  284. ApplyAnimation(playerid,"BSKTBALL","BBALL_pickup",4.0,0,0,0,0,0);
  285. if(Baller != 999)
  286. {
  287. HavingBall[Baller] = 0;
  288. ClearAnimations(Baller);
  289. ApplyAnimation(Baller, "CARRY", "crry_prtial", 1.0, 0, 0, 0, 0, 0);
  290. ApplyAnimation(playerid,"BSKTBALL","BBALL_walk",4.1,1,1,1,1,1);
  291. }
  292. Baller = playerid;
  293. BallStatus = 1;
  294. new Float:x2, Float:y2;
  295. GetXYInFrontOfPlayer(playerid, x2, y2, 0.8);
  296. GetPlayerPos(playerid, x, y, z);
  297. StopObject(Ball);
  298. MoveObject(Ball, x2, y2, z, 2.5);
  299. Anim[playerid] = 0;
  300. BallBounce = 0;
  301. }
  302. }
  303. else
  304. {
  305. if(IsPlayerInRangeOfPoint(playerid, 2, 2795.5237,-2019.6152,13.5547))
  306. {
  307. MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 7.5);
  308. SetPlayerPos(playerid, 2795.5237,-2019.6152,13.5547);
  309. ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);
  310. HavingBall[playerid] = 0;
  311. SetTimerEx("ClearAnim", 1100, 0, "d", playerid);
  312. SetTimerEx("BallDown2", 1100, 0, "d", playerid);
  313. return 1;
  314. }
  315. else if(IsPlayerInRangeOfPoint(playerid, 4, 2795.5237,-2019.6152,13.5547) && IsPlayerFacingPoint(playerid, 20, 2795.5237,-2019.6152,13.5547))
  316. {
  317. new rand = random(1);
  318. if(rand == 0)
  319. {
  320. MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 10.5+random(4));
  321. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  322. ShootingBall = 2;
  323. HavingBall[playerid] = 0;
  324. return 1;
  325. }
  326. ShootMiss(playerid);
  327. return 1;
  328. }
  329. else if(IsPlayerInRangeOfPoint(playerid, 7, 2795.5237,-2019.6152,13.5547) && IsPlayerFacingPoint(playerid, 20, 2795.5237,-2019.6152,13.5547))
  330. {
  331. new rand = random(2);
  332. if(rand == 0)
  333. {
  334. MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 11.0+random(4));
  335. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  336. ShootingBall = 2;
  337. HavingBall[playerid] = 0;
  338. return 1;
  339. }
  340. ShootMiss(playerid);
  341. return 1;
  342. }
  343. else if(IsPlayerInRangeOfPoint(playerid, 10, 2795.5237,-2019.6152,13.5547) && IsPlayerFacingPoint(playerid, 20, 2795.5237,-2019.6152,13.5547))
  344. {
  345. new rand = random(3);
  346. if(rand == 0)
  347. {
  348. MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 11.5+random(4));
  349. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  350. ShootingBall = 2;
  351. HavingBall[playerid] = 0;
  352. return 1;
  353. }
  354. ShootMiss(playerid);
  355. return 1;
  356. }
  357. else if(IsPlayerInRangeOfPoint(playerid, 2, 2768.3669,-2019.6644,13.5547))
  358. {
  359. MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 7.5);
  360. SetPlayerPos(playerid, 2768.3669,-2019.6644,13.5547);
  361. ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);
  362. HavingBall[playerid] = 0;
  363. SetTimerEx("ClearAnim", 800, 0, "d", playerid);
  364. SetTimerEx("BallDown3", 1100, 0, "d", playerid);
  365. return 1;
  366. }
  367. else if(IsPlayerInRangeOfPoint(playerid, 4, 2768.3669,-2019.6644,13.5547) && IsPlayerFacingPoint(playerid, 20, 2768.3669,-2019.6644,13.5547))
  368. {
  369. new rand = random(1);
  370. if(rand == 0)
  371. {
  372. MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 10.5+random(4));
  373. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  374. ShootingBall = 3;
  375. HavingBall[playerid] = 0;
  376. return 1;
  377. }
  378. ShootMiss2(playerid);
  379. return 1;
  380. }
  381. else if(IsPlayerInRangeOfPoint(playerid, 7, 2768.3669,-2019.6644,13.5547) && IsPlayerFacingPoint(playerid, 20, 2768.3669,-2019.6644,13.5547))
  382. {
  383. new rand = random(2);
  384. if(rand == 0)
  385. {
  386. MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 11.0+random(4));
  387. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  388. ShootingBall = 3;
  389. HavingBall[playerid] = 0;
  390. return 1;
  391. }
  392. ShootMiss2(playerid);
  393. return 1;
  394. }
  395. else if(IsPlayerInRangeOfPoint(playerid, 10, 2768.3669,-2019.6644,13.5547) && IsPlayerFacingPoint(playerid, 20, 2768.3669,-2019.6644,13.5547))
  396. {
  397. new rand = random(3);
  398. if(rand == 0)
  399. {
  400. MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 11.5+random(4));
  401. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  402. ShootingBall = 3;
  403. HavingBall[playerid] = 0;
  404. return 1;
  405. }
  406. ShootMiss2(playerid);
  407. return 1;
  408. }
  409. for(new i; i < MAX_PLAYERS; i++)
  410. {
  411. if(IsPlayerConnected(i))
  412. {
  413. if(IsPlayerFacingPlayer(playerid, i, 15))
  414. {
  415. new Float:x, Float:y, Float:z;
  416. GetPlayerPos(i, x, y, z);
  417. if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
  418. {
  419. Baller = i;
  420. HavingBall[playerid] = 0;
  421. ClearAnimations(playerid);
  422. ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
  423. SetTimerEx("ClearAnim", 700, 0, "d", playerid);
  424. MoveObject(Ball, x, y, z, 13+random(4));
  425. Anim[i] = 0;
  426. ShootingBall = 6;
  427. ApplyAnimation(i,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
  428. return 1;
  429. }
  430. }
  431. }
  432. }
  433. new Float:x, Float:y, Float:z;
  434. GetPlayerPos(playerid, x, y, z);
  435. HavingBall[playerid] = 0;
  436. new Float:x2, Float:y2;
  437. GetXYInFrontOfPlayer(playerid, x2, y2, 6.0);
  438. SetTimerEx("BallDown", 600, 0, "df", playerid, z);
  439. MoveObject(Ball, x2, y2, z+random(8)+3, 10.0+random(4));
  440. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  441. ShootingBall = 0;
  442. }
  443. }
  444. return 1;
  445. }
  446.  
  447. stock IsPlayerFacingPoint(playerid, Float:dOffset, Float:pX, Float:pY, Float:pZ)
  448. {
  449. #pragma unused pZ
  450. new
  451. Float:X,
  452. Float:Y,
  453. Float:Z,
  454. Float:pA,
  455. Float:ang;
  456.  
  457. if(!IsPlayerConnected(playerid)) return 0;
  458.  
  459. GetPlayerPos(playerid, X, Y, Z);
  460. GetPlayerFacingAngle(playerid, pA);
  461.  
  462. if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  463. else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  464. else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  465.  
  466. if(AngleInRangeOfAngle(-ang, pA, dOffset)) return true;
  467.  
  468. return false;
  469.  
  470. }
  471.  
  472. stock IsPlayerFacingPlayer(playerid, targetid, Float:dOffset)
  473. {
  474.  
  475. new
  476. Float:pX,
  477. Float:pY,
  478. Float:pZ,
  479. Float:pA,
  480. Float:X,
  481. Float:Y,
  482. Float:Z,
  483. Float:ang;
  484.  
  485. if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return 0;
  486.  
  487. GetPlayerPos(targetid, pX, pY, pZ);
  488. GetPlayerPos(playerid, X, Y, Z);
  489. GetPlayerFacingAngle(playerid, pA);
  490.  
  491. if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  492. else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  493. else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  494.  
  495. if(AngleInRangeOfAngle(-ang, pA, dOffset)) return true;
  496.  
  497. return false;
  498.  
  499. }
  500.  
  501. stock AngleInRangeOfAngle(Float:a1, Float:a2, Float:range)
  502. {
  503.  
  504. a1 -= a2;
  505. if((a1 < range) && (a1 > -range)) return true;
  506.  
  507. return false;
  508.  
  509. }
  510.  
  511. forward BallDown(playerid, Float:oldz);
  512. public BallDown(playerid, Float:oldz)
  513. {
  514. new Float:x, Float:y, Float:z;
  515. GetObjectPos(Ball, x, y, z);
  516. new Float:a;
  517. new Float:x2, Float:y2;
  518. GetPlayerPos(playerid, x2, y2, a);
  519. GetPlayerFacingAngle(playerid, a);
  520. x2 += (16 * floatsin(-a, degrees));
  521. y2 += (16 * floatcos(-a, degrees));
  522. MoveObject(Ball, x2, y2, oldz-0.8, 10.0+random(3));
  523. Baller = 999;
  524. ShootingBall = 0;
  525. BallBounce = 1;
  526. return 1;
  527. }
  528.  
  529. forward BallDown2(playerid);
  530. public BallDown2(playerid)
  531. {
  532. MoveObject(Ball, 2795.5237,-2019.6152,13.5547-0.8, 10.0+random(3));
  533. Baller = 999;
  534. ShootingBall = 0;
  535. GameTextForPlayer(playerid, "~g~Canestro!", 3000, 3);
  536. BallBounce = 1;
  537. return 1;
  538. }
  539.  
  540. forward BallDown3(playerid);
  541. public BallDown3(playerid)
  542. {
  543. MoveObject(Ball, 2768.3669,-2019.6644,13.5547-0.8, 10.0+random(3));
  544. Baller = 999;
  545. ShootingBall = 0;
  546. GameTextForPlayer(playerid, "~g~Canestro!", 3000, 3);
  547. BallBounce = 1;
  548. return 1;
  549. }
  550.  
  551. forward BallDown4(playerid);
  552. public BallDown4(playerid)
  553. {
  554. MoveObject(Ball, 2795.5237+random(5),-2019.6152+random(5),13.5547-0.8, 10.0+random(3));
  555. Baller = 999;
  556. ShootingBall = 0;
  557. GameTextForPlayer(playerid, "~r~Mancato!", 3000, 3);
  558. BallBounce = 1;
  559. return 1;
  560. }
  561.  
  562. forward BallDown5(playerid);
  563. public BallDown5(playerid)
  564. {
  565. MoveObject(Ball, 2768.3669+random(5),-2019.6644+random(5),13.5547-0.8, 10.0+random(3));
  566. Baller = 999;
  567. ShootingBall = 0;
  568. GameTextForPlayer(playerid, "~r~Mancato!", 3000, 3);
  569. BallBounce = 1;
  570. return 1;
  571. }
  572.  
  573. forward ShootMiss(playerid);
  574. public ShootMiss(playerid)
  575. {
  576. MoveObject(Ball, 2794.9612+random(2), -2019.5415+random(2), 15.5075+random(2), 12.5+random(4));
  577. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  578. ShootingBall = 4;
  579. HavingBall[playerid] = 0;
  580. return 1;
  581. }
  582.  
  583. forward ShootMiss2(playerid);
  584. public ShootMiss2(playerid)
  585. {
  586. MoveObject(Ball, 2768.6289+random(2),-2019.7227+random(2),15.6287+random(2), 12.5+random(4));
  587. ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  588. ShootingBall = 5;
  589. HavingBall[playerid] = 0;
  590. return 1;
  591. }
  592.  
  593. forward ClearAnim(playerid);
  594. public ClearAnim(playerid)
  595. {
  596. ClearAnimations(playerid);
  597. return 1;
  598. }
  599.  
  600. GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  601. {
  602. new Float:a;
  603. GetPlayerPos(playerid, x, y, a);
  604. GetPlayerFacingAngle(playerid, a);
  605. if (GetPlayerVehicleID(playerid))
  606. {
  607. GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  608. }
  609. x += (distance * floatsin(-a, degrees));
  610. y += (distance * floatcos(-a, degrees));
  611. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement