Guest User

Untitled

a guest
Jul 21st, 2009
1,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.74 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #pragma tabsize 0
  4.  
  5.  
  6. #define WHITE_COLOR 0xFFFFFFAA // white
  7. #define BLUE_COLOR 0x0000BBAA // blue
  8. #define COLOR_RED 0xAA3333AA //red
  9.  
  10.  
  11. forward GameModeExitFunc();
  12. forward Restart();
  13.  
  14.  
  15. forward OVER();
  16.  
  17.  
  18. #define TEAM_1 0
  19. #define TEAM_2 1
  20. #define TEAM_3 2
  21.  
  22.  
  23. new Team[MAX_PLAYERS];
  24.  
  25.  
  26. new Text:Textdraw0;
  27. new Text:Textdraw1;
  28. new Text:Textdraw2;
  29.  
  30. #if defined FILTERSCRIPT
  31.  
  32. public OnFilterScriptInit()
  33. {
  34. print("\n--------------------------------------");
  35. print(" Blank Filterscript by your name here");
  36. print("--------------------------------------\n");
  37. return 1;
  38. }
  39.  
  40. public OnFilterScriptExit()
  41. {
  42. return 1;
  43. }
  44.  
  45. #else
  46.  
  47. main()
  48. {
  49. print("\n----------------------------------");
  50. print(" President Day");
  51. print("----------------------------------\n");
  52. }
  53.  
  54. #endif
  55.  
  56. public OnGameModeInit()
  57. {
  58. // Don't use these lines if it's a filterscript
  59. SetGameModeText("President Day");
  60.  
  61.  
  62.  
  63. //-------5 minutes-----------
  64. SetTimer("OVER", 300000, 0);
  65.  
  66.  
  67.  
  68. AddPlayerClass(179,-2168.0637,288.5149,35.3203,66.4466,31,500,27,500,0,0); // terriostr
  69.  
  70. AddPlayerClass(285,-2429.3110,323.7393,35.1719,296.9317,31,500,27,500,0,0); // swat
  71. AddPlayerClass(295,-2429.3110,323.7393,35.1719,296.9317,31,500,27,500,0,0); // president
  72.  
  73.  
  74. AddStaticVehicle(474,-2170.9539,293.5864,34.8803,0.2331,26,89); // t cars
  75. AddStaticVehicle(474,-2176.2070,293.0461,34.8814,0.8276,45,102); // t cars 2
  76. AddStaticVehicle(474,-2180.5542,293.2364,34.8794,3.0973,35,35); // t cars 3
  77. AddStaticVehicle(474,-2184.1550,293.4302,34.8800,359.9232,65,1); // t cars 4
  78. AddStaticVehicle(474,-2188.5264,293.9099,34.8799,359.9416,65,1); // t cars 5
  79. AddStaticVehicle(474,-2192.9963,293.6054,34.8800,359.7897,65,1); // t cars 6
  80.  
  81. AddStaticVehicle(597,-2401.7358,346.1073,34.7363,226.6862,0,1); // blocker cop car
  82. AddStaticVehicle(597,-2388.4863,349.0449,34.7523,335.1724,0,1); // blocker cop car 2
  83.  
  84.  
  85.  
  86. Textdraw0 = TextDrawCreate(248.000000,431.000000,"Mini-Games");
  87. TextDrawAlignment(Textdraw0,0);
  88. TextDrawBackgroundColor(Textdraw0,0x000000ff);
  89. TextDrawFont(Textdraw0,0);
  90. TextDrawLetterSize(Textdraw0,1.000000,1.500000);
  91. TextDrawColor(Textdraw0,0xffffffff);
  92. TextDrawSetProportional(Textdraw0,1);
  93. TextDrawSetShadow(Textdraw0,2);
  94.  
  95. Textdraw2 = TextDrawCreate(1.000000,1.000000,"..");
  96. TextDrawUseBox(Textdraw2,1);
  97. TextDrawBoxColor(Textdraw2,0x000000ff);
  98. TextDrawTextSize(Textdraw2,690.000000,435.000000);
  99. TextDrawAlignment(Textdraw2,0);
  100. TextDrawBackgroundColor(Textdraw2,0x000000ff);
  101. TextDrawFont(Textdraw2,3);
  102. TextDrawLetterSize(Textdraw2,1.000000,12.600009);
  103. TextDrawColor(Textdraw2,0x000000ff);
  104. TextDrawSetOutline(Textdraw2,1);
  105. TextDrawSetProportional(Textdraw2,1);
  106. TextDrawSetShadow(Textdraw2,1);
  107.  
  108.  
  109. Textdraw1 = TextDrawCreate(1.000000,426.000000,"..");
  110. TextDrawUseBox(Textdraw1,1);
  111. TextDrawBoxColor(Textdraw1,0x000000ff);
  112. TextDrawTextSize(Textdraw1,674.000000,0.000000);
  113. TextDrawAlignment(Textdraw1,0);
  114. TextDrawBackgroundColor(Textdraw1,0x000000ff);
  115. TextDrawFont(Textdraw1,3);
  116. TextDrawLetterSize(Textdraw1,1.000000,2.200000);
  117. TextDrawColor(Textdraw1,0x000000ff);
  118. TextDrawSetOutline(Textdraw1,1);
  119. TextDrawSetProportional(Textdraw1,1);
  120. TextDrawSetShadow(Textdraw1,1);
  121.  
  122.  
  123. return 1;
  124. }
  125.  
  126. public OnGameModeExit()
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnPlayerRequestClass(playerid, classid)
  132. {
  133. SetPlayerPos(playerid, 1644.4078,-1133.8214,58.2172);
  134. SetPlayerCameraPos(playerid, 1647.6301,-1134.5725,58.2489);
  135. SetPlayerCameraLookAt(playerid, 1644.4078,-1133.8214,58.2172);
  136. SetPlayerFacingAngle(playerid,258.5584);
  137.  
  138. if(classid == 0)
  139. {
  140. GameTextForPlayer(playerid, "~r~ Terriost", 9000, 3);
  141. Team[playerid] = TEAM_1;
  142. }
  143. else if(classid == 1)
  144. {
  145. GameTextForPlayer(playerid, "~b~ Swat", 9000, 3);
  146. Team[playerid] = TEAM_2;
  147. }
  148. else if(classid == 2)
  149. {
  150.  
  151. GameTextForPlayer(playerid, "~b~ President", 9000, 3);
  152. Team{playerid} = TEAM_3;
  153. }
  154. return 1;
  155. }
  156.  
  157. public OnPlayerRequestSpawn(playerid)
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnPlayerConnect(playerid)
  163. {
  164. //---------------------WELCOME MESSAGE-----------------------------
  165. SendClientMessage(playerid,BLUE_COLOR, "Server: (Mini-Games)");
  166. SendClientMessage(playerid,WHITE_COLOR, "GameMode: President Day");
  167. SendClientMessage(playerid,WHITE_COLOR, "Author: MAdFLAv0R");
  168. SendClientMessage(playerid,WHITE_COLOR, "Idea: MAdFLAv0R");
  169.  
  170. GameTextForPlayer(playerid, " ~r~ President Day", 2500 , 0);
  171.  
  172. TextDrawShowForPlayer(playerid, Textdraw0);
  173. TextDrawShowForPlayer(playerid, Textdraw1);
  174. TextDrawShowForPlayer(playerid, Textdraw2);
  175. return 1;
  176. }
  177.  
  178.  
  179. public OnPlayerDisconnect(playerid, reason)
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnPlayerSpawn(playerid)
  185. {
  186. if(Team[playerid] == TEAM_1)
  187. {
  188. SetPlayerColor(playerid, WHITE_COLOR);
  189. }
  190. else if(Team[playerid] == TEAM_2)
  191. {
  192. SetPlayerColor(playerid, BLUE_COLOR);
  193. }
  194.  
  195. SendClientMessage(playerid,BLUE_COLOR," 5 Min Left");
  196.  
  197. TextDrawHideForPlayer(playerid, Textdraw1);
  198. TextDrawHideForPlayer(playerid, Textdraw2);
  199.  
  200.  
  201. return 1;
  202. }
  203.  
  204.  
  205. public OnPlayerDeath(playerid, killerid, reason)
  206. {
  207. SendDeathMessage(killerid, playerid, reason);
  208. SetPlayerScore(killerid,(GetPlayerScore(killerid))+1);
  209. return 1;
  210. }
  211.  
  212. public OnVehicleSpawn(vehicleid)
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnVehicleDeath(vehicleid, killerid)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnPlayerText(playerid, text[])
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnPlayerPrivmsg(playerid, recieverid, text[])
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnPlayerCommandText(playerid, cmdtext[])
  233. {
  234. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  235. {
  236. // Do something here
  237. return 1;
  238. }
  239. return 0;
  240. }
  241.  
  242. public OnPlayerInfoChange(playerid)
  243. {
  244. return 1;
  245. }
  246.  
  247. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  248. {
  249. return 1;
  250. }
  251.  
  252. public OnPlayerExitVehicle(playerid, vehicleid)
  253. {
  254. return 1;
  255. }
  256.  
  257. public OnPlayerStateChange(playerid, newstate, oldstate)
  258. {
  259. return 1;
  260. }
  261.  
  262. public OnPlayerEnterCheckpoint(playerid)
  263. {
  264. return 1;
  265. }
  266.  
  267. public OnPlayerLeaveCheckpoint(playerid)
  268. {
  269. return 1;
  270. }
  271.  
  272. public OnPlayerEnterRaceCheckpoint(playerid)
  273. {
  274. return 1;
  275. }
  276.  
  277. public OnPlayerLeaveRaceCheckpoint(playerid)
  278. {
  279. return 1;
  280. }
  281.  
  282. public OnRconCommand(cmd[])
  283. {
  284. return 1;
  285. }
  286.  
  287. public OnObjectMoved(objectid)
  288. {
  289. return 1;
  290. }
  291.  
  292. public OnPlayerObjectMoved(playerid, objectid)
  293. {
  294. return 1;
  295. }
  296.  
  297. public OnPlayerPickUpPickup(playerid, pickupid)
  298. {
  299. return 1;
  300. }
  301.  
  302. public OnPlayerSelectedMenuRow(playerid, row)
  303. {
  304. return 1;
  305. }
  306.  
  307. public OnPlayerExitedMenu(playerid)
  308. {
  309. return 1;
  310. }
  311. public OVER()
  312. {
  313. GameTextForAll("~r~ TIME UP! ~b~ The President Has Been Killed", 2500 , 0);
  314. SetTimer("Restart", 10000 , 0);
  315. }
  316. public GameModeExitFunc()
  317. {
  318. GameModeExit();
  319. }
  320. public Restart()
  321. {
  322. GameTextForAll("~g~ Misson Passed ~b~ Gamemode Changing", 2500, 0);
  323. SendRconCommand("gmx");
  324. }
Advertisement
Add Comment
Please, Sign In to add comment