Guest User

SimpleGangWar

a guest
Oct 4th, 2013
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.42 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////CRAZYOU///////////////////////////////////////////////////////////////////////////
  2. #include <a_samp>
  3. #include <core>
  4. #include <float>
  5. #pragma tabsize 0
  6.  
  7. static gTeam[MAX_PLAYERS];
  8.  
  9. // TEAMS
  10. #define TEAM_USA 0
  11. #define TEAM_URSS 1
  12.  
  13. //CORES
  14. #define TEAM_USA_COLOR 0x0000FFAA
  15. #define TEAM_URSS_COLOR 0xFF0000AA
  16.  
  17. forward SetPlayerToTeamColor(playerid);
  18. forward SetupPlayerForClassSelection(playerid);
  19. forward SetPlayerTeamFromClass(playerid,classid);
  20. forward ExitTheGameMode();
  21.  
  22. main()
  23. {
  24. print("=====================");
  25. print("CrazYou - GM Gang War");
  26. print("=====================");
  27. }
  28.  
  29. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  30.  
  31. public OnGameModeInit()
  32. {
  33. SetGameModeText("CrazYou GW");
  34.  
  35. ShowPlayerMarkers(1); //Deixe 1 para mostrar icone dos jogadores no mapa 0 para não mostrar
  36. ShowNameTags(1);//Deixe 1 para mostrar o nick dos jogadores em cima da cabeça deles 0 para não
  37. SetWorldTime(2);//Clima do mapa pesquise no Google os IDs
  38.  
  39. // USA CLASSES
  40. AddPlayerClass(286,2518.0029,-1684.1617,13.4536,42.7035,24,100000,29,100000,31,100000); //
  41.  
  42. // URSS CLASSES
  43. AddPlayerClass(287,1721.7826,-1635.8347,20.2124,357.5200,24,100000,29,100000,30,100000); //
  44.  
  45. //////////////////////////////////////////////////////////////////////////////MAPA////////////////////////////////////////////////////////////////////////////
  46. AddStaticVehicleEx(520,2494.8999000,-1669.3000500,14.3000000,0.0000000,141,141,300); //Hydra
  47. AddStaticVehicleEx(432,277.8999900,1955.6999500,17.7000000,270.0000000,141,141,300); //Rhino
  48. AddStaticVehicleEx(432,277.1000100,1989.5999800,17.7000000,270.0000000,141,141,300); //Rhino
  49. AddStaticVehicleEx(432,277.2000100,2023.5999800,17.7000000,270.0000000,141,141,300); //Rhino
  50. AddStaticVehicleEx(520,300.2999900,2051.1001000,18.6000000,180.0000000,141,141,300); //Hydra
  51. AddStaticVehicleEx(520,314.0000000,2051.3000500,18.6000000,180.0000000,141,141,300); //Hydra
  52. AddStaticVehicleEx(548,281.5000000,1929.9000200,19.5000000,270.0000000,141,141,300); //Cargobob
  53. AddStaticVehicleEx(425,316.2999900,1805.5000000,18.5000000,0.0000000,141,141,300); //Hunter
  54. AddStaticVehicleEx(425,303.5000000,1805.4000200,18.5000000,0.0000000,141,141,300); //Hunter
  55. AddStaticVehicleEx(470,220.3000000,1920.5999800,17.8000000,180.0000000,141,141,300); //Patriot
  56. AddStaticVehicleEx(470,211.8000000,1920.5999800,17.8000000,180.0000000,141,141,300); //Patriot
  57. AddStaticVehicleEx(470,202.3999900,1920.6999500,17.8000000,178.2710000,141,141,300); //Patriot
  58. AddStaticVehicleEx(470,193.3999900,1920.6999500,17.8000000,180.3630000,141,141,300); //Patriot
  59. AddStaticVehicleEx(468,201.8000000,1814.5999800,17.4000000,0.0000000,141,141,300); //Sanchez
  60. AddStaticVehicleEx(468,200.3000000,1814.6999500,17.4000000,0.0000000,141,141,300); //Sanchez
  61. AddStaticVehicleEx(433,278.7999900,1788.3000500,18.2000000,0.0000000,141,141,300); //Barracks
  62. AddStaticVehicleEx(433,283.8999900,1788.5000000,18.2000000,0.0000000,141,141,300); //Barracks
  63. AddStaticVehicleEx(433,-1240.3000500,438.7999900,7.8000000,0.0000000,141,141,300); //Barracks
  64. AddStaticVehicleEx(433,-1232.3000500,438.6000100,7.8000000,0.0000000,141,141,300); //Barracks
  65. AddStaticVehicleEx(470,-1384.0999800,455.2000100,7.3000000,0.0000000,141,141,300); //Patriot
  66. AddStaticVehicleEx(470,-1389.9000200,455.3999900,7.3000000,0.0000000,141,141,300); //Patriot
  67. AddStaticVehicleEx(470,-1396.0000000,455.6000100,7.3000000,0.0000000,141,141,300); //Patriot
  68. AddStaticVehicleEx(470,-1402.3000500,455.6000100,7.3000000,0.0000000,141,141,300); //Patriot
  69. AddStaticVehicleEx(520,-1267.0999800,498.2999900,19.2000000,271.1220000,141,141,300); //Hydra
  70. AddStaticVehicleEx(520,-1301.6999500,507.6000100,19.2000000,271.1220000,141,141,300); //Hydra
  71. AddStaticVehicleEx(425,-1415.3000500,493.1000100,19.1000000,271.1220000,141,141,300); //Hunter
  72. AddStaticVehicleEx(425,-1425.8000500,507.8999900,19.1000000,271.1220000,141,141,300); //Hunter
  73. AddStaticVehicleEx(548,-1360.5999800,507.8999900,20.1000000,271.1220000,141,141,300); //Cargobob
  74. AddStaticVehicleEx(432,-1466.0999800,457.7000100,7.3000000,0.0000000,141,141,300); //Rhino
  75. AddStaticVehicleEx(432,-1454.5000000,457.2000100,7.3000000,0.0000000,141,141,300); //Rhino
  76. AddStaticVehicleEx(468,-1526.5999800,483.5000000,6.9000000,0.0000000,141,141,300); //Sanchez
  77. AddStaticVehicleEx(468,-1533.6999500,483.3999900,6.9000000,0.0000000,141,141,300); //Sanchez
  78.  
  79. return 1;
  80. }
  81.  
  82. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  83.  
  84. public OnPlayerConnect(playerid)
  85. {
  86. SetPlayerColor(playerid,0xFFFFFFFF);
  87. UsePlayerPedAnims();
  88.  
  89. return 1;
  90. }
  91.  
  92. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  93.  
  94. public SetupPlayerForClassSelection(playerid)
  95. {
  96. SetPlayerInterior(playerid,11);
  97. SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
  98. SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
  99. SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
  100. SetPlayerFacingAngle(playerid,0.0);
  101. }
  102.  
  103. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  104.  
  105. public SetPlayerTeamFromClass(playerid,classid)
  106. {
  107. if(classid == 0) {
  108. gTeam[playerid] = TEAM_USA;
  109. } else if(classid == 1) {
  110. gTeam[playerid] = TEAM_URSS;
  111. }
  112. return 1;
  113. }
  114. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  115.  
  116. public SetPlayerToTeamColor(playerid)
  117. {
  118. if(gTeam[playerid] == TEAM_USA) {
  119. SetPlayerColor(playerid,TEAM_USA_COLOR); //
  120. } else if(gTeam[playerid] == TEAM_URSS) {
  121. SetPlayerColor(playerid,TEAM_URSS_COLOR); //
  122. }
  123. return 1;
  124. }
  125. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  126.  
  127. public OnPlayerRequestClass(playerid, classid)
  128. {
  129. SetupPlayerForClassSelection(playerid);
  130. SetPlayerTeamFromClass(playerid,classid);
  131. ApplyAnimation(playerid,"PARK","Tai_Chi_in",4.1,1,0,0,0,0);
  132. if(classid == 0) {
  133. GameTextForPlayer(playerid,"~b~USA",1000,5);
  134. } else if(classid == 1) {
  135. GameTextForPlayer(playerid,"~r~URSS",1000,5);
  136. }
  137. return 1;
  138. }
  139.  
  140. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  141.  
  142. public OnPlayerSpawn(playerid)
  143. {
  144. SetPlayerToTeamColor(playerid);
  145. SetPlayerInterior(playerid,0);
  146. return 1;
  147. }
  148.  
  149. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  150.  
  151. public ExitTheGameMode()
  152. {
  153. GameModeExit();
  154. }
  155.  
  156. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  157.  
  158. public OnPlayerDeath(playerid, killerid, reason)
  159. {
  160. SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  161. SetPlayerScore(playerid, GetPlayerScore(playerid) - 0);
  162. GivePlayerMoney(killerid,GetPlayerMoney(killerid) + 1000);
  163. SendDeathMessage(killerid, playerid, reason);
  164. GameTextForPlayer(playerid,"~r~ELIMINADO",1000,0);//Mensagem que será mostrada quando o jogador morre
  165. return 1;
  166. }
  167.  
  168. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  169.  
  170. public OnPlayerDisconnect(playerid, reason)
  171. {
  172. return 1;
  173. }
  174.  
  175. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  176.  
  177. public OnPlayerCommandText(playerid, cmdtext[])
  178. {
  179. if (strcmp("/creditos", cmdtext, true)==0)
  180. {
  181. SendClientMessage(playerid, 0xFF0000AA, "Feito por CrazYou");//Não retire se não quiser ter problemas
  182. return 1;
  183.  
  184. }
  185. return 0;
  186. }
  187. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment