Guest User

VirSpector

a guest
Sep 17th, 2009
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new gBomb[MAX_PLAYERS]; //Save Information about how many Bombs do that player have
  4.  
  5. #define COLOR_AGENT 0x0015FFFF //Just Color
  6. #define COLOR_TERRORIST 0xD8000000 //Just Color
  7. #define COLOR_SYSTEM 0xFFF16B6B //Just Color
  8.  
  9. main()
  10. {
  11. print("\n----------------------------------");
  12. print("Bomb It Up - Source - VirSpector Server");
  13. print("----------------------------------\n");
  14. }
  15.  
  16. public OnGameModeInit()
  17. {
  18. // Don't use these lines if it's a filterscript
  19. SetGameModeText("BoOm It Up By ViRsPeCtOr SeRvEr");
  20. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  21. return 1;
  22. }
  23.  
  24. public OnGameModeExit()
  25. {
  26. return 1;
  27. }
  28.  
  29. public OnPlayerRequestClass(playerid, classid)
  30. {
  31. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  32. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  33. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  34. return 1;
  35. }
  36.  
  37. public OnPlayerRequestSpawn(playerid)
  38. {
  39. return 1;
  40. }
  41.  
  42. public OnPlayerConnect(playerid)
  43. {
  44. return 1;
  45. }
  46.  
  47. public OnPlayerDisconnect(playerid, reason)
  48. {
  49. return 1;
  50. }
  51.  
  52. public OnPlayerSpawn(playerid)
  53. {
  54. return 1;
  55. }
  56.  
  57. public OnPlayerDeath(playerid, killerid, reason)
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnVehicleSpawn(vehicleid)
  63. {
  64. return 1;
  65. }
  66.  
  67. public OnVehicleDeath(vehicleid, killerid)
  68. {
  69. return 1;
  70. }
  71.  
  72. public OnPlayerText(playerid, text[])
  73. {
  74. return 1;
  75. }
  76.  
  77. public OnPlayerPrivmsg(playerid, recieverid, text[])
  78. {
  79. return 1;
  80. }
  81.  
  82. public OnPlayerCommandText(playerid, cmdtext[])
  83. {
  84. // THIS ONE IS THE SOURCE
  85. if (strcmp("/buybomb", cmdtext, true) == 0)
  86. {
  87. if(GetPlayerScore(playerid) > 1){
  88. gBomb[playerid] += 1;
  89. SetPlayerScore(playerid, GetPlayerScore(playerid) - 2);
  90. SendClientMessage(playerid, COLOR_TERRORIST, "<~> You lost 2 scores for buying a bomb <~>");
  91. SendClientMessage(playerid, COLOR_SYSTEM, "<~> Type /usebomb to use the bomb <~>");
  92. }
  93. else
  94. {
  95. SendClientMessage(playerid, COLOR_AGENT, "<~> 1 Bomb Cost 2 scores, collect more scores if you want to buy a bomb! <~>");
  96. }
  97. return 1;
  98. }
  99. if (strcmp("/usebomb", cmdtext, true) == 0)
  100. {
  101. new Float:x, Float:y, Float:z;
  102. if(gBomb[playerid] > 0)
  103. {
  104. GetPlayerPos(playerid,x,y,z);
  105. AddStaticPickup(1225, 11, x, y, z);
  106. SendClientMessage(playerid, COLOR_SYSTEM, "<~> You placed an Explosive Barrel <~>");
  107. gBomb[playerid] -= 1;
  108. }
  109. else
  110. {
  111. SendClientMessage(playerid, COLOR_AGENT, "<~> You don't have any bomb! Use /buybomb to buy a bomb (Cost: 2 Scores Each Bomb) <~>");
  112. }
  113. return 1;
  114. }
  115. return 0;
  116. // END OF THE SOURCE
  117. }
  118.  
  119. public OnPlayerInfoChange(playerid)
  120. {
  121. return 1;
  122. }
  123.  
  124. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  125. {
  126. return 1;
  127. }
  128.  
  129. public OnPlayerExitVehicle(playerid, vehicleid)
  130. {
  131. return 1;
  132. }
  133.  
  134. public OnPlayerStateChange(playerid, newstate, oldstate)
  135. {
  136. return 1;
  137. }
  138.  
  139. public OnPlayerEnterCheckpoint(playerid)
  140. {
  141. return 1;
  142. }
  143.  
  144. public OnPlayerLeaveCheckpoint(playerid)
  145. {
  146. return 1;
  147. }
  148.  
  149. public OnPlayerEnterRaceCheckpoint(playerid)
  150. {
  151. return 1;
  152. }
  153.  
  154. public OnPlayerLeaveRaceCheckpoint(playerid)
  155. {
  156. return 1;
  157. }
  158.  
  159. public OnRconCommand(cmd[])
  160. {
  161. return 1;
  162. }
  163.  
  164. public OnObjectMoved(objectid)
  165. {
  166. return 1;
  167. }
  168.  
  169. public OnPlayerObjectMoved(playerid, objectid)
  170. {
  171. return 1;
  172. }
  173.  
  174. public OnPlayerPickUpPickup(playerid, pickupid)
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnPlayerSelectedMenuRow(playerid, row)
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnPlayerExitedMenu(playerid)
  185. {
  186. return 1;
  187. }
  188.  
Advertisement
Add Comment
Please, Sign In to add comment