rockbandcheeseman

RandomProjectile

Jun 23rd, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.80 KB | None | 0 0
  1. -- Random Projectile
  2.  
  3. function GetRequiredVersion()
  4.  
  5.     return 10059
  6. end
  7.  
  8. function OnScriptLoad(processId)
  9.  
  10.  
  11. end
  12.  
  13. --[[
  14. function OnScriptUnload()
  15.  
  16.  
  17. end
  18. --]]
  19.  
  20. --[[
  21. function OnNewGame(map)
  22.  
  23.  
  24. end
  25. --]]
  26.  
  27. --[[
  28. function OnGameEnd(stage)
  29.  
  30.  
  31. end
  32. --]]
  33.  
  34. --[[
  35. function OnServerChat(player, type, message)
  36.    
  37.     --return true
  38. end
  39. --]]
  40.  
  41. --[[
  42. function OnServerCommand(player, command)
  43.  
  44.     --return true
  45. end
  46. --]]
  47.  
  48. --[[
  49. function OnBanCheck(hash, ip)
  50.    
  51.     --return true
  52. end
  53. --]]
  54.  
  55. --[[
  56. function OnPlayerJoin(player)
  57.  
  58.  
  59. end
  60. --]]
  61.  
  62. --[[
  63. function OnPlayerLeave(player)
  64.  
  65.  
  66. end
  67. --]]
  68.  
  69. --[[
  70. function OnPlayerKill(killer, victim, mode)
  71.  
  72.  
  73. end
  74. --]]
  75.  
  76. --[[
  77. function OnKillMultiplier(player, multiplier)
  78.  
  79.  
  80. end
  81. --]]
  82.  
  83. --[[
  84. function OnPlayerSpawn(player)
  85.  
  86.  
  87. end
  88. --]]
  89.  
  90. --[[
  91. function OnPlayerSpawnEnd(player)
  92.  
  93.  
  94. end
  95. --]]
  96.  
  97. --[[
  98. function OnWeaponAssignment(player, objId, slot, weapId)
  99.    
  100.     --return mapid
  101. end
  102. --]]
  103.  
  104. proj = {
  105. "vehicles\\banshee\\banshee bolt",
  106. "vehicles\\banshee\\mp_banshee fuel rod",
  107. "vehicles\\c gun turret\\mp gun turret",
  108. "vehicles\\ghost\\ghost bolt",
  109. "vehicles\\scorpion\\bullet",
  110. "vehicles\\scorpion\\tank shell",
  111. "vehicles\\warthog\\bullet",
  112. "weapons\\assault rifle\\bullet",
  113. "weapons\\flamethrower\\flame",
  114. "weapons\\needler\\mp_needle",
  115. "weapons\\needler\\needle",
  116. "weapons\\pistol\\bullet",
  117. "weapons\\plasma pistol\\bolt",
  118. "weapons\\plasma rifle\\bolt",
  119. "weapons\\plasma rifle\\charged bolt",
  120. "weapons\\plasma_cannon\\plasma_cannon",
  121. "weapons\\rocket launcher\\rocket",
  122. "weapons\\shotgun\\pellet",
  123. "weapons\\sniper rifle\\sniper bullet"
  124. }
  125.  
  126. function OnObjectCreationAttempt(mapId, parentId, player)
  127.    
  128.     local tagname, tagtype = gettaginfo(mapId)
  129.    
  130.     if tagtype == "weap" then
  131.         return gettagid("weap", "weapons\\gravity rifle\\gravity rifle")
  132.     end
  133.    
  134.     if tagtype == "proj" then
  135.         if tagname == "weapons\\frag grenade\\frag grenade" then
  136.             return gettagid("proj", "weapons\\rocket launcher\\rocket")
  137.         elseif tagname == "weapons\\plasma grenade\\plasma grenade" then
  138.             return gettagid("proj", "vehicles\\banshee\\mp_banshee fuel rod")
  139.         elseif tagname == "weapons\\flamethrower\\flame" then
  140.             return gettagid("proj", proj[getrandomnumber(1, #proj + 1)])
  141.         end
  142.     end
  143. end
  144.  
  145. --[[
  146. function OnObjectCreation(objId)
  147.  
  148.  
  149. end
  150. --]]
  151.  
  152. --[[
  153. function OnObjectInteraction(player, objId, mapId)
  154.    
  155.    
  156. end
  157. --]]
  158.  
  159. --[[
  160. function OnTeamDecision(team)
  161.    
  162.     --return team
  163. end
  164. --]]
  165.  
  166. --[[
  167. function OnTeamChange(player, old_team, new_team, voluntary)
  168.    
  169.     --return true
  170. end
  171. --]]
  172.  
  173. --[[
  174. function OnDamageLookup(receiver, causer, tagdata, mapId)
  175.    
  176.     -- 0x1D0
  177.     -- 0x1D4
  178.     -- 0x1D8
  179. end
  180. --]]
  181.  
  182. --[[
  183. function OnVehicleEntry(player, m_vehiId, seat, mapId, voluntary)
  184.    
  185.    
  186. end
  187. --]]
  188.  
  189. --[[
  190. function OnVehicleEject(player, voluntary)
  191.  
  192.     --return true
  193. end
  194. --]]
Advertisement
Add Comment
Please, Sign In to add comment