Advertisement
cia

Grav Gun Script

cia
Jul 4th, 2015
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.66 KB | None | 0 0
  1. Function 0 2 0
  2. CallNative "NETWORK_SET_SCRIPT_IS_SAFE_FOR_NETWORK_GAME" 0 0
  3. Call @Label_0
  4. Return 0 0
  5.  
  6.  
  7. :Label_0
  8. Function 0 2 0
  9. fPush_6.0
  10. StaticSet1 4
  11. PushString "MAFINS"
  12. CallNative "GET_HASH_KEY" 1 1
  13. Push 1782556917
  14. JumpEQ @Label_1
  15. PushString "~r~NopeNopeNopeNope"
  16. Call @Label_5
  17. PushS 2200
  18. CallNative "WAIT" 1 0
  19. push_1
  20. Call @Label_5
  21. :Label_1
  22. PushString "Gravity Gun by "
  23. PushString "MAFINS"
  24. Call @Label_7
  25. Call @Label_6
  26. PushString "Use ~b~PISTOL~s~ for hax"
  27. Call @Label_6
  28. :Label_2
  29. push_0
  30. CallNative "WAIT" 1 0
  31. Call @Label_24
  32. Jump @Label_2
  33. Return 0 0
  34.  
  35.  
  36. :Label_3
  37. Function 0 2 0
  38. push_0
  39. Push1 24
  40. CallNative "DISABLE_CONTROL_ACTION" 2 0
  41. Return 0 0
  42.  
  43.  
  44. :Label_4
  45. Function 0 2 0
  46. push_0
  47. Push1 184
  48. CallNative "IS_CONTROL_JUST_PRESSED" 2 1
  49. Return 0 1
  50.  
  51.  
  52. :Label_5
  53. Function 1 3 0
  54. PushString "STRING"
  55. CallNative "UNK_F42C43C7" 1 0
  56. getF1 0
  57. CallNative "UNK_27A244D8" 1 0
  58. PushS 2000
  59. push_1
  60. CallNative "UNK_38F82261" 2 0
  61. Return 1 0
  62.  
  63.  
  64. :Label_6
  65. Function 1 4 0
  66. PushString "STRING"
  67. CallNative "UNK_574EE85C" 1 0
  68. getF1 0
  69. CallNative "UNK_27A244D8" 1 0
  70. push_0
  71. push_1
  72. CallNative "UNK_08F7AF78" 2 1
  73. Drop
  74. Return 1 0
  75.  
  76.  
  77. :Label_7
  78. Function 2 2 0
  79. getF1 0
  80. pStatic2 100
  81. StrCopy 32
  82. getF1 1
  83. pStatic2 100
  84. StrAdd 32
  85. pStatic2 100
  86. Return 2 1
  87.  
  88.  
  89. Function 1 3 0
  90. getF1 0
  91. Return 1 1
  92.  
  93.  
  94. :Label_8
  95. Function 1 3 0
  96. CallNative "NETWORK_IS_IN_SESSION" 0 1
  97. JumpFalse @Label_10
  98. push_0
  99. setF1 2
  100. getF1 0
  101. CallNative "NETWORK_REQUEST_CONTROL_OF_NETWORK_ID" 1 1
  102. Not
  103. JumpFalse @Label_10
  104. :Label_9
  105. push_0
  106. CallNative "WAIT" 1 0
  107. getF1 0
  108. CallNative "NETWORK_HAS_CONTROL_OF_NETWORK_ID" 1 1
  109. getF1 0
  110. CallNative "NETWORK_REQUEST_CONTROL_OF_NETWORK_ID" 1 1
  111. Not
  112. JumpFalse @Label_10
  113. getF1 2
  114. Add1 1
  115. setF1 2
  116. getF1 2
  117. Push1 20
  118. JumpLT @Label_9
  119. :Label_10
  120. Return 1 0
  121.  
  122.  
  123. :Label_11
  124. Function 1 2 0
  125. getF1 0
  126. pStatic2 100
  127. push_1
  128. CallNative "GET_CURRENT_PED_WEAPON" 3 1
  129. Drop
  130. StaticGet2 100
  131. Return 1 1
  132.  
  133.  
  134. :Label_12
  135. Function 0 3 0
  136. push_2
  137. Push1 26
  138. CallNative "DISABLE_CONTROL_ACTION" 2 0
  139. push_2
  140. Push1 186
  141. CallNative "IS_DISABLED_CONTROL_PRESSED" 2 1
  142. JumpFalse @Label_13
  143. StaticGet1 4
  144. fPush 0.10000000149012
  145. fAdd
  146. StaticSet1 4
  147. :Label_13
  148. push_2
  149. Push1 186
  150. CallNative "IS_DISABLED_CONTROL_PRESSED" 2 1
  151. JumpFalse @Label_16
  152. StaticGet1 4
  153. fPush_3.0
  154. JumpLE @Label_14
  155. StaticGet1 4
  156. fPush 0.10000000149012
  157. fSub
  158. StaticSet1 4
  159. :Label_14
  160. CallNative "PLAYER_PED_ID" 0 1
  161. Dup
  162. setF1 2
  163. CallNative "GET_PED_STEALTH_MOVEMENT" 1 1
  164. JumpFalse @Label_15
  165. getF1 2
  166. push_0
  167. push_0
  168. CallNative "SET_PED_STEALTH_MOVEMENT" 3 0
  169. :Label_15
  170. getF1 2
  171. CallNative "GET_PED_COMBAT_MOVEMENT" 1 1
  172. JumpFalse @Label_16
  173. getF1 2
  174. push_0
  175. CallNative "SET_PED_COMBAT_MOVEMENT" 2 0
  176. :Label_16
  177. push_2
  178. Push1 26
  179. CallNative "ENABLE_CONTROL_ACTION" 2 0
  180. Return 0 0
  181.  
  182.  
  183. Function 3 9 0
  184. getF1 0
  185. CallNative "IS_PED_ON_FOOT" 1 1
  186. JumpFalse @Label_20
  187. getF1 0
  188. push_1
  189. CallNative "GET_ENTITY_COORDS" 2 3
  190. push_3
  191. pStatic2 465
  192. FromStack
  193. push_0
  194. setF1 8
  195. push_0
  196. setF1 7
  197. fPush -1
  198. setF1 6
  199. :Label_17
  200. getF1 6
  201. fPush_1.0
  202. fAdd
  203. setF1 6
  204. getF1 7
  205. push_0
  206. JumpLE @Label_18
  207. push_-1
  208. getF1 0
  209. CallNative "GET_ENTITY_HEADING" 1 1
  210. fMul
  211. CallNative "SIN" 1 1
  212. getF1 6
  213. fMul
  214. getF1 7
  215. fAdd
  216. setF1 7
  217. push_-1
  218. getF1 0
  219. CallNative "GET_ENTITY_HEADING" 1 1
  220. fMul
  221. CallNative "COS" 1 1
  222. getF1 6
  223. fMul
  224. getF1 8
  225. fAdd
  226. setF1 8
  227. getF1 6
  228. getF1 2
  229. JumpLT @Label_17
  230. Jump @Label_19
  231. :Label_18
  232. push_-1
  233. getF1 0
  234. CallNative "GET_ENTITY_HEADING" 1 1
  235. fMul
  236. CallNative "SIN" 1 1
  237. getF1 6
  238. fMul
  239. pStatic2 465
  240. GetImmediate1 0
  241. fAdd
  242. setF1 7
  243. push_-1
  244. getF1 0
  245. CallNative "GET_ENTITY_HEADING" 1 1
  246. fMul
  247. CallNative "COS" 1 1
  248. getF1 6
  249. fMul
  250. pStatic2 465
  251. GetImmediate1 1
  252. fAdd
  253. setF1 8
  254. getF1 6
  255. getF1 2
  256. JumpLT @Label_17
  257. :Label_19
  258. getF1 7
  259. getF1 8
  260. pStatic2 465
  261. GetImmediate1 2
  262. getF1 1
  263. push_0
  264. Push1 64
  265. CallNative "GET_CLOSEST_VEHICLE" 6 1
  266. setF1 5
  267. getF1 5
  268. CallNative "DOES_ENTITY_EXIST" 1 1
  269. JumpFalse @Label_20
  270. getF1 5
  271. Return 3 1
  272.  
  273.  
  274. :Label_20
  275. push_0
  276. Return 3 1
  277.  
  278.  
  279. Function 3 4 0
  280. getF1 0
  281. push_1
  282. CallNative "GET_ENTITY_COORDS" 2 3
  283. push_3
  284. pStatic2 465
  285. FromStack
  286. push_-1
  287. getF1 0
  288. CallNative "GET_ENTITY_HEADING" 1 1
  289. fMul
  290. CallNative "SIN" 1 1
  291. getF1 2
  292. fMul
  293. pStatic2 465
  294. GetImmediate1 0
  295. fAdd
  296. pStatic2 465
  297. SetImmediate1 0
  298. push_-1
  299. getF1 0
  300. CallNative "GET_ENTITY_HEADING" 1 1
  301. fMul
  302. CallNative "COS" 1 1
  303. getF1 2
  304. fMul
  305. pStatic2 465
  306. GetImmediate1 1
  307. fAdd
  308. pStatic2 465
  309. SetImmediate1 1
  310. getF1 1
  311. CallNative "NETWORK_GET_NETWORK_ID_FROM_ENTITY" 1 1
  312. Call @Label_8
  313. getF1 1
  314. push_3
  315. pStatic2 465
  316. ToStack
  317. push_0
  318. push_0
  319. push_0
  320. CallNative "SET_ENTITY_COORDS_NO_OFFSET" 7 0
  321. Return 3 0
  322.  
  323.  
  324. :Label_21
  325. Function 0 2 0
  326. StaticGet1 0
  327. CallNative "DOES_PARTICLE_FX_LOOPED_EXIST" 1 1
  328. Not
  329. JumpFalse @Label_22
  330. CallNative "REQUEST_PTFX_ASSET" 0 0
  331. CallNative "HAS_PTFX_ASSET_LOADED" 0 1
  332. JumpFalse @Label_22
  333. pStatic2 465
  334. GetImmediate1 2
  335. fPush 1.6000000238419
  336. fAdd
  337. pStatic2 465
  338. SetImmediate1 2
  339. PushString "scr_alarm_damage_sparks"
  340. getF1 0
  341. push_3
  342. pStatic2 465
  343. ToStack
  344. fPush_0.0
  345. fPush_0.0
  346. Dup
  347. Push 1065353216
  348. push_0
  349. push_0
  350. push_0
  351. CallNative "START_PARTICLE_FX_LOOPED_AT_COORD" 12 1
  352. StaticSet1 0
  353. :Label_22
  354. Return 0 0
  355.  
  356.  
  357. :Label_23
  358. Function 2 6 0
  359. push_2
  360. CallNative "GET_GAMEPLAY_CAM_ROT" 1 3
  361. push_3
  362. pFrame1 3
  363. FromStack
  364. getF1 0
  365. push_3
  366. pFrame1 3
  367. ToStack
  368. push_2
  369. push_1
  370. CallNative "SET_ENTITY_ROTATION" 6 0
  371. push_-1
  372. PushString "Foot_Swish"
  373. getF1 1
  374. PushString "FBI_05_SOUNDS"
  375. push_0
  376. push_0
  377. CallNative "PLAY_SOUND_FROM_ENTITY" 6 0
  378. getF1 0
  379. push_1
  380. fPush_0.0
  381. fPush 300
  382. fPush
  383. fPush
  384. fPush
  385. fPush 0.69999998807907
  386. push_0
  387. push_1
  388. push_1
  389. push_1
  390. push_0
  391. push_1
  392. CallNative "APPLY_FORCE_TO_ENTITY" 14 0
  393. Return 2 0
  394.  
  395.  
  396. :Label_24
  397. Function 0 2 0
  398. CallNative "PLAYER_PED_ID" 0 1
  399. CallNative "DOES_ENTITY_EXIST" 1 1
  400. CallNative "PLAYER_PED_ID" 0 1
  401. CallNative "IS_PED_ON_FOOT" 1 1
  402. And
  403. JumpFalse @Label_27
  404. CallNative "PLAYER_PED_ID" 0 1
  405. Call @Label_11
  406. Push 453432689
  407. JumpNE @Label_27
  408. CallNative "PLAYER_ID" 0 1
  409. CallNative "IS_PLAYER_TARGETTING_ANYTHING" 1 1
  410. JumpFalse @Label_26
  411. Call @Label_3
  412. Call @Label_12
  413. CallNative "PLAYER_ID" 0 1
  414. pStatic2 100
  415. CallNative "UNK_8866D9D0" 2 1
  416. JumpFalse @Label_27
  417. StaticGet2 100
  418. CallNative "DOES_ENTITY_EXIST" 1 1
  419. JumpFalse @Label_27
  420. StaticGet2 100
  421. CallNative "IS_ENTITY_A_PED" 1 1
  422. JumpFalse @Label_25
  423. StaticGet2 100
  424. push_0
  425. CallNative "GET_VEHICLE_PED_IS_IN" 2 1
  426. StaticSet1 100
  427. :Label_25
  428. StaticGet1 4
  429. Call @Label_28
  430. push_3
  431. pStatic2 206
  432. FromStack
  433. StaticGet2 100
  434. push_3
  435. pStatic2 206
  436. ToStack
  437. push_0
  438. push_0
  439. push_0
  440. CallNative "SET_ENTITY_COORDS_NO_OFFSET" 7 0
  441. Call @Label_21
  442. Call @Label_4
  443. JumpFalse @Label_27
  444. StaticGet2 100
  445. CallNative "PLAYER_PED_ID" 0 1
  446. Call @Label_23
  447. Jump @Label_27
  448. :Label_26
  449. StaticGet1 0
  450. CallNative "DOES_PARTICLE_FX_LOOPED_EXIST" 1 1
  451. JumpFalse @Label_27
  452. StaticGet1 0
  453. push_0
  454. CallNative "STOP_PARTICLE_FX_LOOPED" 2 0
  455. CallNative "REMOVE_PTFX_ASSET" 0 0
  456. :Label_27
  457. Return 0 0
  458.  
  459.  
  460. :Label_28
  461. Function 1 12 0
  462. push_2
  463. CallNative "GET_GAMEPLAY_CAM_ROT" 1 3
  464. setF1 5
  465. Drop
  466. setF1 3
  467. CallNative "GET_GAMEPLAY_CAM_COORD" 0 3
  468. setF1 8
  469. setF1 7
  470. setF1 6
  471. getF1 5
  472. setF1 4
  473. getF1 0
  474. getF1 3
  475. CallNative "COS" 1 1
  476. fMul
  477. setF1 9
  478. getF1 9
  479. getF1 4
  480. fPush_-1
  481. fMul
  482. CallNative "SIN" 1 1
  483. fMul
  484. getF1 6
  485. fAdd
  486. setF1 10
  487. getF1 9
  488. getF1 4
  489. fPush_-1
  490. fMul
  491. CallNative "COS" 1 1
  492. fMul
  493. getF1 7
  494. fAdd
  495. setF1 11
  496. getF1 0
  497. getF1 3
  498. CallNative "SIN" 1 1
  499. fMul
  500. getF1 8
  501. fAdd
  502. setF1 12
  503. getF1 10
  504. getF1 11
  505. getF1 12
  506. Return 1 3
  507.  
  508.  
  509. Function 1 7 0
  510. CallNative "PLAYER_PED_ID" 0 1
  511. CallNative "GET_ENTITY_HEADING" 1 1
  512. setF1 3
  513. CallNative "PLAYER_PED_ID" 0 1
  514. push_1
  515. CallNative "GET_ENTITY_COORDS" 2 3
  516. setF1 6
  517. setF1 5
  518. setF1 4
  519. fPush_-1
  520. getF1 3
  521. fMul
  522. CallNative "SIN" 1 1
  523. getF1 0
  524. fMul
  525. getF1 4
  526. fAdd
  527. setF1 4
  528. fPush_-1
  529. getF1 3
  530. fMul
  531. CallNative "COS" 1 1
  532. getF1 0
  533. fMul
  534. getF1 5
  535. fAdd
  536. setF1 5
  537. getF1 4
  538. getF1 5
  539. getF1 6
  540. Return 1 3
  541.  
  542.  
  543. Function 1 7 0
  544. CallNative "PLAYER_PED_ID" 0 1
  545. push_1
  546. CallNative "GET_ENTITY_COORDS" 2 3
  547. setF1 6
  548. setF1 5
  549. setF1 4
  550. fPush_-1
  551. push_1
  552. getF1 0
  553. ArrayGet1 1
  554. fMul
  555. CallNative "SIN" 1 1
  556. push_0
  557. getF1 0
  558. ArrayGet1 1
  559. fMul
  560. getF1 4
  561. fAdd
  562. setF1 4
  563. fPush_-1
  564. push_1
  565. getF1 0
  566. ArrayGet1 1
  567. fMul
  568. CallNative "COS" 1 1
  569. getF1 0
  570. fMul
  571. getF1 5
  572. fAdd
  573. setF1 5
  574. getF1 4
  575. getF1 5
  576. getF1 6
  577. Return 1 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement