gta6287

fixed

Jun 5th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 8.58 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #define TEAM_YELLOW 1    //Team one
  8. #define TEAM_BLUE 2    //Team two
  9.  
  10. new gTeam[MAX_PLAYERS];//For defining teams
  11. new Minutes =2;//For defining game minutes
  12. new Seconds =59;//For defining game Seconds
  13. new CurrentMap;//For defining maps number
  14. new Text:Textdraw0;//Tjis is the textdraw for timeleft
  15.  
  16. #define COL_YELLOW         0xFFFF00C8
  17. #define COL_BLUE           0x0080FFC8
  18.  
  19. forward NewMap(playerid);
  20. forward NewRound(playerid);
  21. forward GameTime();
  22.  
  23.  
  24. #if defined FILTERSCRIPT
  25.  
  26. public OnFilterScriptInit()
  27. {
  28.     print("\n--------------------------------------");
  29.     print(" Blank Filterscript by your name here");
  30.     print("--------------------------------------\n");
  31.     return 1;
  32. }
  33.  
  34. public OnFilterScriptExit()
  35. {
  36.     return 1;
  37. }
  38.  
  39. #else
  40.  
  41. main()
  42. {
  43.     print("\n----------------------------------");
  44.     print(" Blank Gamemode by your name here");
  45.     print("----------------------------------\n");
  46. }
  47.  
  48. #endif
  49.  
  50. public OnGameModeInit()
  51. {
  52.     // Don't use these lines if it's a filterscript
  53.     SetGameModeText("Blank Script");
  54.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  55.     //map system
  56.     CurrentMap = 0;
  57.     SetTimer("NewMap",180000,1); // 2 min
  58.     SetTimer("GameTime",1000,1);
  59.     //Text DRaw of Map changing system
  60.     Textdraw0 = TextDrawCreate(227.000000, 3.000000, "_");
  61.     TextDrawBackgroundColor(Textdraw0, 255);
  62.     TextDrawFont(Textdraw0, 1);
  63.     TextDrawLetterSize(Textdraw0, 0.509999, 1.999999);
  64.     TextDrawColor(Textdraw0, -1);
  65.     TextDrawSetOutline(Textdraw0, 0);
  66.     TextDrawSetProportional(Textdraw0, 1);
  67.     TextDrawSetShadow(Textdraw0, 1);
  68.     return 1;
  69. }
  70.  
  71. public OnGameModeExit()
  72. {
  73.     TextDrawDestroy(Textdraw0);
  74.     return 1;
  75. }
  76.  
  77. public OnPlayerRequestClass(playerid, classid)
  78. {
  79.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  80.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  81.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  82.     return 1;
  83. }
  84.  
  85. public OnPlayerConnect(playerid)
  86. {
  87.     return 1;
  88. }
  89.  
  90. public OnPlayerDisconnect(playerid, reason)
  91. {
  92.     return 1;
  93. }
  94.  
  95. public OnPlayerSpawn(playerid)
  96. {
  97.     TextDrawShowForPlayer(playerid,Textdraw0);
  98.     //maps
  99.     switch(CurrentMap)
  100.     {
  101.         case 0:// Map 1
  102.         {
  103.             if(gTeam[playerid] == TEAM_YELLOW) {//Team 1 functions
  104.                 SetPlayerColor(playerid,COL_YELLOW);
  105.                 SetPlayerPos(playerid, 236.2544,-1802.1465,28.1407);//Set the postion for the players for map 1
  106.                 SetPlayerFacingAngle(playerid, 186.7970);//Set facing angle of players for map 1
  107.                 SetPlayerInterior(playerid,0);
  108.             }
  109.             if(gTeam[playerid] == TEAM_BLUE) {//Team 2 functin
  110.                 SetPlayerColor(playerid,COL_BLUE);
  111.                 SetPlayerPos(playerid, 234.8519,-1855.6536,8.2832);//Set the postion for the players for map 1
  112.                 SetPlayerFacingAngle(playerid, 351.4334);//Set facing angle of players for map 1
  113.                 SetPlayerInterior(playerid,0);
  114.             }
  115.         }
  116.         case 1:// Map 2
  117.         {
  118.             if(gTeam[playerid] == TEAM_YELLOW) {//Team 1 functions
  119.                 SetPlayerColor(playerid,COL_YELLOW);
  120.                 SetPlayerPos(playerid, 2761.5713,1218.4265,26.8340);//Set the postion for the players for map 1
  121.                 SetPlayerFacingAngle(playerid, 224.2976);//Set facing angle of players for map 1
  122.                 SetPlayerInterior(playerid,0);
  123.             }
  124.             if(gTeam[playerid] == TEAM_BLUE) {//Team 2 functin
  125.                 SetPlayerColor(playerid,COL_BLUE);
  126.                 SetPlayerPos(playerid, 2825.0347,1106.3010,21.6618);//Set the postion for the players for map 1
  127.                 SetPlayerFacingAngle(playerid, 9.3883);//Set facing angle of players for map 1
  128.                 SetPlayerInterior(playerid,0);
  129.             }
  130.         }
  131.     }
  132.     return 1;
  133. }
  134.  
  135. public OnPlayerDeath(playerid, killerid, reason)
  136. {
  137.     return 1;
  138. }
  139.  
  140. public OnVehicleSpawn(vehicleid)
  141. {
  142.     return 1;
  143. }
  144.  
  145. public OnVehicleDeath(vehicleid, killerid)
  146. {
  147.     return 1;
  148. }
  149.  
  150. public OnPlayerText(playerid, text[])
  151. {
  152.     return 1;
  153. }
  154.  
  155. public OnPlayerCommandText(playerid, cmdtext[])
  156. {
  157.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  158.     {
  159.         // Do something here
  160.         return 1;
  161.     }
  162.     return 0;
  163. }
  164.  
  165. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnPlayerExitVehicle(playerid, vehicleid)
  171. {
  172.     return 1;
  173. }
  174.  
  175. public OnPlayerStateChange(playerid, newstate, oldstate)
  176. {
  177.     return 1;
  178. }
  179.  
  180. public OnPlayerEnterCheckpoint(playerid)
  181. {
  182.     return 1;
  183. }
  184.  
  185. public OnPlayerLeaveCheckpoint(playerid)
  186. {
  187.     return 1;
  188. }
  189.  
  190. public OnPlayerEnterRaceCheckpoint(playerid)
  191. {
  192.     return 1;
  193. }
  194.  
  195. public OnPlayerLeaveRaceCheckpoint(playerid)
  196. {
  197.     return 1;
  198. }
  199.  
  200. public OnRconCommand(cmd[])
  201. {
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerRequestSpawn(playerid)
  206. {
  207.     return 1;
  208. }
  209.  
  210. public OnObjectMoved(objectid)
  211. {
  212.     return 1;
  213. }
  214.  
  215. public OnPlayerObjectMoved(playerid, objectid)
  216. {
  217.     return 1;
  218. }
  219.  
  220. public OnPlayerPickUpPickup(playerid, pickupid)
  221. {
  222.     return 1;
  223. }
  224.  
  225. public OnVehicleMod(playerid, vehicleid, componentid)
  226. {
  227.     return 1;
  228. }
  229.  
  230. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  231. {
  232.     return 1;
  233. }
  234.  
  235. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnPlayerSelectedMenuRow(playerid, row)
  241. {
  242.     return 1;
  243. }
  244.  
  245. public OnPlayerExitedMenu(playerid)
  246. {
  247.     return 1;
  248. }
  249.  
  250. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  251. {
  252.     return 1;
  253. }
  254.  
  255. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  256. {
  257.     return 1;
  258. }
  259.  
  260. public OnRconLoginAttempt(ip[], password[], success)
  261. {
  262.     return 1;
  263. }
  264.  
  265. public OnPlayerUpdate(playerid)
  266. {
  267.     return 1;
  268. }
  269.  
  270. public OnPlayerStreamIn(playerid, forplayerid)
  271. {
  272.     return 1;
  273. }
  274.  
  275. public OnPlayerStreamOut(playerid, forplayerid)
  276. {
  277.     return 1;
  278. }
  279.  
  280. public OnVehicleStreamIn(vehicleid, forplayerid)
  281. {
  282.     return 1;
  283. }
  284.  
  285. public OnVehicleStreamOut(vehicleid, forplayerid)
  286. {
  287.     return 1;
  288. }
  289.  
  290. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  291. {
  292.     return 1;
  293. }
  294.  
  295. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  296. {
  297.     return 1;
  298. }
  299.  
  300. public GameTime()
  301. {
  302.     if(Seconds || Minutes) {
  303.         Seconds--;
  304.         if(Seconds <= -1) {
  305.             Minutes--;
  306.             Seconds=59;
  307.         }
  308.         new TimeString[128];
  309.         format(TimeString,sizeof(TimeString),"~g~Timeleft ~w~: %02d:%02d",Minutes,Seconds);
  310.         TextDrawSetString(Textdraw0,TimeString);
  311.     }
  312.  
  313.     return 1;
  314. }
  315.  
  316. public NewMap(playerid) {
  317.  
  318.     CurrentMap++;
  319.     GameTextForAll("~w~Server:~r~ Loading Next map",5000,4);
  320.     SetTimer("NewRound",5000,0);
  321.     return 1;
  322. }
  323.  
  324. public NewRound(playerid) {
  325.     for(new i = 0; i < MAX_PLAYERS; i++)
  326.     {
  327.         SpawnPlayer(i);
  328.         switch(CurrentMap)
  329.         {
  330.             case 0://Map 1
  331.             {
  332.                 if(gTeam[playerid] == TEAM_YELLOW)
  333.                 {//Team 1 functions
  334.                     SetPlayerColor(i,COL_YELLOW);
  335.                     SetPlayerPos(i, 236.2544,-1802.1465,28.1407);//Set the postion for the players for map 1
  336.                     SetPlayerFacingAngle(i, 186.7970);
  337.                     SetPlayerInterior(i,0);
  338.                     Minutes =2;// game minutes
  339.                     Seconds =49;// game seconds
  340.                 }
  341.                 if(gTeam[playerid] == TEAM_YELLOW)
  342.                 {//Team 1 functions
  343.                     SetPlayerColor(i,COL_YELLOW);
  344.                     SetPlayerPos(i, 236.2544,-1802.1465,28.1407);//Set the postion for the players for map 1
  345.                     SetPlayerFacingAngle(i, 186.7970);
  346.                     SetPlayerInterior(i,0);// seting all interior
  347.                     Minutes =2;// game minutes
  348.                     Seconds =49;// game seconds
  349.                 }
  350.             }
  351.             case 1://Map 2
  352.             {
  353.                 if(gTeam[playerid] == TEAM_YELLOW)
  354.                 {//Team 1 functions
  355.                     SetPlayerColor(i,COL_YELLOW);
  356.                     SetPlayerPos(i, 2761.5713,1218.4265,26.8340);//Set the postion for the players for map 1
  357.                     SetPlayerFacingAngle(i, 224.2976);//Set facing angle of players for map 1
  358.                     SetPlayerInterior(i,0);
  359.                 }
  360.                 if(gTeam[playerid] == TEAM_BLUE) {//Team 2 functin
  361.                     SetPlayerColor(playerid,COL_BLUE);
  362.                     SetPlayerPos(i, 2825.0347,1106.3010,21.6618);//Set the postion for the players for map 1
  363.                     SetPlayerFacingAngle(i, 9.3883);//Set facing angle of players for map 1
  364.                     SetPlayerInterior(i,0);
  365.                 }
  366.              }
  367.         }
  368.     }
  369.     return 1;
  370. }
Advertisement
Add Comment
Please, Sign In to add comment