Guest User

Untitled

a guest
Jul 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. #include <a_samp>
  2. new gTeam[MAX_PLAYERS];
  3. #define GREEN 0
  4. #define BLUE 1
  5. #define TEAM_GREEN_COLOR 0x77CC77FF
  6. #define TEAM_BLUE_COLOR 0x7777DDFF
  7. forward SetPlayerToTeamColor(playerid);
  8. forward PickUp(playerid);
  9. new GOTP = 0;
  10. new pizza1;
  11. new pizza2;
  12. new pizza3;
  13. new pizza4;
  14. new pizza5;
  15.  
  16.  
  17. public OnGameModeInit()
  18. {
  19. SetGameModeText("THE PIZZA!");
  20. AddPlayerClass(104,2063.6157,-1585.3534,13.4818,269.6799,31,1000000,24,1000000,-1,-1);
  21. AddPlayerClass(102,2076.4358,-1586.9498,13.4838,90.4516,27,1000000,24,1000000,-1,-1);
  22. AddPlayerClass(155,2104.1987,-1810.7928,13.5547,87.6317,30,1000000,29,1000000,-1,-1);
  23. AddPlayerClass(167,2104.4573,-1803.9337,13.5547,91.0221,34,1000000,25,1000000,-1,-1);
  24. pizza1 = CreateObject(1582, 2102.0610351563, -1793.1125488281, 13.318605422974, 0, 0, 0);
  25. pizza2 = CreateObject(1582, 2103.9296875, -1800.4904785156, 13.318605422974, 0, 0, 0);
  26. pizza3 = CreateObject(1582, 2104.0625, -1812.4545898438, 13.318605422974, 0, 0, 0);
  27. pizza4 = CreateObject(1582, 2103.3754882813, -1817.2326660156, 13.318605422974, 0, 0, 0);
  28. pizza5 = CreateObject(1582, 2102.1044921875, -1819.9056396484, 13.318605422974, 0, 0, 0);
  29. return 1;
  30. }
  31.  
  32. public OnGameModeExit()
  33. {
  34. return 1;
  35. }
  36.  
  37. public OnPlayerRequestClass(playerid, classid)
  38. {
  39. SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
  40. SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
  41. SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
  42. SetPlayerFacingAngle(playerid,0.0);
  43. if(classid == 0 || classid == 1)
  44. {
  45. gTeam[playerid] = GREEN;
  46. GameTextForPlayer(playerid,"~g~GREEN TEAM",2000,3);
  47. }
  48. else if(classid == 2 || classid == 3)
  49. {
  50. gTeam[playerid] = BLUE;
  51. GameTextForPlayer(playerid,"~b~BLUE TEAM",2000,3);
  52. }
  53. return 1;
  54. }
  55.  
  56. public OnPlayerConnect(playerid)
  57. {
  58. return 1;
  59. }
  60.  
  61. public OnPlayerDisconnect(playerid, reason)
  62. {
  63. return 1;
  64. }
  65.  
  66. public OnPlayerSpawn(playerid)
  67. {
  68. return 1;
  69. }
  70.  
  71. public OnPlayerDeath(playerid, killerid, reason)
  72. {
  73. return 1;
  74. }
  75.  
  76. public OnVehicleSpawn(vehicleid)
  77. {
  78. return 1;
  79. }
  80.  
  81. public OnVehicleDeath(vehicleid, killerid)
  82. {
  83. return 1;
  84. }
  85.  
  86. public OnPlayerText(playerid, text[])
  87. {
  88. return 1;
  89. }
  90.  
  91. public OnPlayerCommandText(playerid, cmdtext[])
  92. {
  93. return 1;
  94. }
  95.  
  96. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  97. {
  98. return 1;
  99. }
  100.  
  101. public OnPlayerExitVehicle(playerid, vehicleid)
  102. {
  103. return 1;
  104. }
  105.  
  106. public OnPlayerStateChange(playerid, newstate, oldstate)
  107. {
  108. return 1;
  109. }
  110.  
  111. public OnPlayerEnterCheckpoint(playerid)
  112. {
  113. return 1;
  114. }
  115.  
  116. public OnPlayerLeaveCheckpoint(playerid)
  117. {
  118. return 1;
  119. }
  120.  
  121. public OnPlayerEnterRaceCheckpoint(playerid)
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnPlayerLeaveRaceCheckpoint(playerid)
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnRconCommand(cmd[])
  132. {
  133. return 1;
  134. }
  135.  
  136. public OnPlayerRequestSpawn(playerid)
  137. {
  138. return 1;
  139. }
  140.  
  141. public OnObjectMoved(objectid)
  142. {
  143. return 1;
  144. }
  145.  
  146. public OnPlayerObjectMoved(playerid, objectid)
  147. {
  148. return 1;
  149. }
  150.  
  151. public OnPlayerPickUpPickup(playerid, pickupid)
  152. {
  153. return 1;
  154. }
  155.  
  156. public OnVehicleMod(playerid, vehicleid, componentid)
  157. {
  158. return 1;
  159. }
  160.  
  161. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  162. {
  163. return 1;
  164. }
  165.  
  166. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  167. {
  168. return 1;
  169. }
  170.  
  171. public OnPlayerSelectedMenuRow(playerid, row)
  172. {
  173. return 1;
  174. }
  175.  
  176. public OnPlayerExitedMenu(playerid)
  177. {
  178. return 1;
  179. }
  180.  
  181. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnRconLoginAttempt(ip[], password[], success)
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerUpdate(playerid)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnPlayerStreamIn(playerid, forplayerid)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnPlayerStreamOut(playerid, forplayerid)
  207. {
  208. return 1;
  209. }
  210.  
  211. public OnVehicleStreamIn(vehicleid, forplayerid)
  212. {
  213. return 1;
  214. }
  215.  
  216. public OnVehicleStreamOut(vehicleid, forplayerid)
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  222. {
  223. return 1;
  224. }
  225.  
  226. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  227. {
  228. return 1;
  229. }
  230.  
  231. public PickUp(playerid)
  232. {
  233. if(IsPlayerInRangeOfPoint(playerid, 14.0, 2102.0610351563, -1793.1125488281, 13.318605422974))
  234. {
  235. if(gTeam[playerid] == GREEN)
  236. {
  237. SendClientMessage(playerid, 0xFFFF0000, "u have the pizza");
  238. }
  239. }
  240. }
  241.  
  242. public SetPlayerToTeamColor(playerid)
  243. {
  244. if(gTeam[playerid] == GREEN) {
  245. SetPlayerColor(playerid,TEAM_GREEN_COLOR); // green
  246. } else if(gTeam[playerid] == BLUE) {
  247. SetPlayerColor(playerid,TEAM_BLUE_COLOR); // blue
  248. }
  249. }
Add Comment
Please, Sign In to add comment