Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2017
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. public fw_CmdStart(id, uc_handle, seed)
  2. {
  3. if (CurButton & 1 && get_pdata_float(id, 83, 5, "") <= 0 && g_cannon_ammo[id][0][0])
  4. {
  5. CurButton = CurButton & -2;
  6. set_uc(uc_handle, UC_Buttons, 5192);
  7. if (get_gametime() - 3.33 <= g_LastAttack[id][0][0])
  8. {
  9. Set_PlayerNextAttack(id, g_LastAttack[id][0][0] - get_gametime());
  10. return 1;
  11. }
  12. if (task_exists(id + 210120174, 0) && 1 << id & 31 & is_mode2)
  13. {
  14. remove_task(id + 210120174, 0);
  15. is_dragonout = ~1 << id & 31 & is_dragonout;
  16. make_efspr(id);
  17. make_dragon(id);
  18. make_attackblast(id);
  19. }
  20. create_fake_attack(id);
  21. Make_Push(id);
  22. Create_CannonFire(id, 1);
  23. make_fire_smoke(id);
  24. check_radius_damage(id);
  25. emit_sound(id, CHAN_WEAPON, "weapons/cannonex_shoota.wav", 1.00, 0.80, 0, 100);
  26. g_cannon_ammo[id]--;
  27. update_ammo(id);
  28. if (!g_cannon_ammo[id][0][0])
  29. {
  30. set_task(0.50, "set_weapon_outofammo", id + 210120171, "", 0, "", 0);
  31. }
  32. if (!1 << id & 31 & is_mode2)
  33. {
  34. Set_WeaponAnim(id, 4);
  35. Set_WeaponIdleTime(id, 12, 3.33);
  36. Set_PlayerNextAttack(id, 3.33);
  37. }
  38. else
  39. {
  40. if (1 << id & 31 & is_dragonout)
  41. {
  42. Set_WeaponAnim(id, 7);
  43. Set_WeaponIdleTime(id, 12, 200.00);
  44. Set_PlayerNextAttack(id, 200.00);
  45. set_task(2.50, "special_reload", id + 210120173, "", 0, "", 0);
  46. }
  47. Set_WeaponAnim(id, 5);
  48. Set_WeaponIdleTime(id, 12, 3.33);
  49. Set_PlayerNextAttack(id, 3.33);
  50. }
  51. g_LastAttack[id] = get_gametime();
  52. }
  53. else
  54. {
  55. if (CurButton & 2048 && !1 << id & 31 & is_mode2 && get_pdata_float(id, 83, 5, "") <= 0)
  56. {
  57. CurButton = CurButton & -2049;
  58. set_uc(uc_handle, UC_Buttons, 5192);
  59. Set_WeaponAnim(id, 6);
  60. make_dragonlight(id);
  61. Set_PlayerNextAttack(id, 200.00);
  62. Set_WeaponIdleTime(id, 12, 200.00);
  63. set_task(3.13, "change_mode", id + 210120172, "", 0, "", 0);
  64. }
  65. if (CurButton & 2048 && 1 << id & 31 & is_mode2)
  66. {
  67. ExecuteHamB(Ham_Weapon_WeaponIdle, ent);
  68. }
  69. }
  70. return 2;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement