legodude

legodude

Jul 12th, 2010
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 12.98 KB | None | 0 0
  1. #include <a_samp>
  2. #define COLOR_ERROR 0xFF0000AA
  3. #define COLOR_DEATHMESSAGE 0xBB2222AA
  4. main()
  5. {
  6.     print("\n----------------------------------");
  7.     print(" minigun maddnes by legodude");
  8.     print("----------------------------------\n");
  9. }
  10.  
  11. new MiniGun[10];
  12. new Respawned[MAX_PLAYERS];
  13. forward ResetSpawn(playerid);
  14. SetupPlayerForClassSelection(playerid)
  15. {
  16.     SetPlayerVirtualWorld(playerid,1);
  17.     SetPlayerInterior(playerid,playerid);
  18.     SetPlayerPos(playerid,-22.2254,2578.9976,49.1895);
  19.     SetPlayerFacingAngle(playerid,1.4317);
  20.     SetPlayerCameraPos(playerid,-21.9830,2593.8301,55.4564);
  21.     SetPlayerCameraLookAt(playerid,-22.2254,2578.9976,49.1895);
  22. }
  23.  
  24. public OnGameModeInit()
  25. {
  26.     /*ADDPLAYERCLASSES*/
  27.     AddPlayerClass(0, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  28.     AddPlayerClass(129, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  29.     AddPlayerClass(196, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  30.     AddPlayerClass(199, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  31.     AddPlayerClass(201, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  32.     AddPlayerClass(178, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  33.     AddPlayerClass(238, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  34.     AddPlayerClass(244, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  35.     AddPlayerClass(246, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  36.     AddPlayerClass(87, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  37.     AddPlayerClass(90, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  38.     AddPlayerClass(81, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  39.     AddPlayerClass(23, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  40.     AddPlayerClass(167, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  41.     AddPlayerClass(209, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  42.     AddPlayerClass(155, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  43.     AddPlayerClass(205, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  44.     AddPlayerClass(264, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  45.     AddPlayerClass(134, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  46.     AddPlayerClass(137, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  47.     AddPlayerClass(212, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  48.     AddPlayerClass(230, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  49.     AddPlayerClass(239, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  50.     AddPlayerClass(252, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  51.     AddPlayerClass(77, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  52.     AddPlayerClass(168, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  53.     AddPlayerClass(1, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  54.     AddPlayerClass(2, -22.2254,2578.9976,49.1895,1.4317, 38, 3000, 0, 0, 0, 0);
  55.    
  56.  
  57.     // Don't use these lines if it's a filterscript
  58.     SetGameModeText("minigun maddnes");
  59.     CreateObject(8147, 44.897186, 2479.171143, 18.585402, 0.0000, 0.0000, 0.0000);
  60.     CreateObject(8147, -27.853838, 2552.047119, 18.585402, 0.0000, 0.0000, 90.0000);
  61.     CreateObject(8147, -27.469004, 2406.366943, 18.434439, 0.0000, 0.0000, 270.0000);
  62.     CreateObject(8147, -100.330017, 2479.335449, 18.435404, 0.0000, 0.0000, 180.0000);
  63.     CreateObject(2669, -49.867813, 2412.726563, 17.873657, 0.0000, 0.0000, 157.5000);
  64.     CreateObject(2669, -88.005089, 2418.036621, 16.368313, 0.0000, 0.0000, 180.0000);
  65.     CreateObject(2669, -80.170334, 2468.227539, 16.824648, 0.0000, 0.0000, 112.5000);
  66.     CreateObject(2669, -84.865425, 2529.593262, 16.824648, 0.0000, 0.0000, 33.7500);
  67.     CreateObject(2669, -24.934219, 2469.604492, 16.824648, 0.0000, 0.0000, 67.5000);
  68.     CreateObject(2669, -35.067230, 2475.363525, 16.824648, 0.0000, 0.0000, 315.0000);
  69.     CreateObject(2669, -16.942120, 2493.483398, 16.824648, 0.0000, 0.0000, 146.2500);
  70.     CreateObject(2669, -34.050240, 2500.935303, 16.824648, 0.0000, 0.0000, 225.0000);
  71.     CreateObject(2669, 21.234066, 2522.330078, 16.824648, 0.0000, 0.0000, 315.0000);
  72.     CreateObject(2669, 35.616646, 2426.706543, 16.824648, 0.0000, 0.0000, 202.5001);
  73.     CreateObject(3575, -33.394302, 2488.454590, 18.176065, 0.0000, 0.0000, 0.0000);
  74.     CreateObject(3575, -52.436295, 2432.552490, 17.635550, 0.0000, 0.0000, 45.0000);
  75.     CreateObject(3575, -5.527261, 2457.608887, 18.176067, 0.0000, 0.0000, 78.7500);
  76.     CreateObject(3575, 24.982796, 2456.449707, 18.176065, 0.0000, 0.0000, 123.7499);
  77.     CreateObject(3575, 5.904660, 2430.411133, 18.176065, 0.0000, 0.0000, 168.7499);
  78.     CreateObject(3575, 5.858524, 2497.646240, 18.176065, 0.0000, 0.0000, 202.5000);
  79.     CreateObject(3575, 2.523205, 2479.314697, 18.176065, 0.0000, 0.0000, 247.4999);
  80.     CreateObject(3575, 25.350515, 2501.763916, 18.183874, 0.0000, 0.0000, 292.5000);
  81.     CreateObject(3575, -0.895657, 2516.311035, 18.176065, 0.0000, 0.0000, 0.0001);
  82.     CreateObject(3575, -43.464104, 2527.581787, 18.176065, 0.0000, 0.0000, 45.0000);
  83.     CreateObject(3575, -16.163395, 2505.837646, 18.176065, 0.0000, 0.0000, 78.7501);
  84.     CreateObject(3575, -20.636154, 2535.135010, 18.176065, 0.0000, 0.0000, 112.5000);
  85.     CreateObject(3575, -74.209961, 2495.662842, 18.176065, 0.0000, 0.0000, 146.2501);
  86.     CreateObject(3575, -69.387939, 2452.993408, 17.418032, 0.0000, 0.0000, 180.0001);
  87.     CreateObject(7025, -34.727539, 2454.368164, 18.777340, 0.0000, 0.0000, 0.0000);
  88.     CreateObject(7025, -20.372036, 2433.678467, 18.734993, 0.0000, 0.0000, 33.7500);
  89.     CreateObject(7025, 22.961739, 2474.405762, 18.912155, 0.0000, 0.0000, 67.5000);
  90.     CreateObject(7025, 34.211952, 2538.566895, 18.919861, 0.0000, 0.0000, 56.2500);
  91.     CreateObject(7025, 5.163776, 2538.741699, 18.912155, 0.0000, 0.0000, 11.2500);
  92.     CreateObject(7025, -50.218170, 2510.759033, 18.912155, 0.0000, 0.0000, 33.7500);
  93.     CreateObject(7025, -52.741600, 2479.706543, 18.912155, 0.0000, 0.0000, 67.5000);
  94.     CreateObject(3575, -75.641037, 2420.260254, 17.160713, 0.0000, 0.0000, 202.5001);
  95.     CreateObject(3575, -87.805939, 2439.459229, 17.128534, 0.0000, 0.0000, 213.7501);
  96.     CreateObject(3575, -52.838921, 2462.770752, 17.995157, 0.0000, 0.0000, 225.0001);
  97.     CreateObject(3575, -17.271572, 2478.717041, 18.176065, 0.0000, 0.0000, 225.0001);
  98.     CreateObject(3575, -3.899902, 2446.489746, 18.168312, 0.0000, 0.0000, 270.0001);
  99.     CreateObject(3575, -32.568817, 2511.026611, 18.176067, 0.0000, 0.0000, 281.2501);
  100.     CreateObject(3575, -71.213806, 2537.424316, 18.176065, 0.0000, 0.0000, 303.7501);
  101.     CreateObject(7025, -72.968605, 2513.899170, 18.919964, 0.0000, 0.0000, 45.0000);
  102.     CreateObject(7025, -51.610977, 2498.451904, 18.912155, 0.0000, 0.0000, 11.2500);
  103.     CreateObject(7025, -85.836792, 2479.822754, 18.912157, 0.0000, 0.0000, 11.2500);
  104.     CreateObject(7025, -35.021217, 2421.130127, 19.109848, 0.0000, 0.0000, 337.5000);
  105.     CreateObject(7025, -7.170467, 2422.442383, 18.898041, 0.0000, 0.0000, 326.2500);
  106.     CreateObject(7025, 24.780033, 2429.223389, 18.912155, 0.0000, 0.0000, 292.5000);
  107.     CreateObject(7025, -35.254478, 2441.222412, 18.623093, 0.0000, 0.0000, 348.7500);
  108.     CreateObject(7025, -8.789692, 2492.427490, 18.912155, 0.0000, 0.0000, 247.5000);
  109.     CreateObject(3575, 15.312395, 2510.631592, 18.176065, 0.0000, 0.0000, 292.5000);
  110.     CreateObject(14553, 75.982727, 2502.419434, 15.969280, 22.3454, 357.4217, 97.7349);//vliegtuig
  111.     CreateObject(2780, 63.701988, 2494.566162, 15.484375, 0.0000, 0.0000, 0.0000);//smokemachines
  112.     CreateObject(2780, 79.460953, 2497.642822, 15.484375, 0.0000, 0.0000, 0.0000);
  113.     CreateObject(2780, 75.917831, 2496.808350, 15.484375, 0.0000, 0.0000, 0.0000);
  114.     CreateObject(2780, 73.102303, 2510.412598, 15.484375, 0.0000, 0.0000, 0.0000);
  115.     CreateObject(2780, 84.717972, 2512.329102, 15.484375, 0.0000, 0.0000, 0.0000);
  116.     CreateObject(2780, 97.649323, 2510.941162, 15.484375, 0.0000, 0.0000, 0.0000);
  117.     CreateObject(2780, 111.872345, 2509.893066, 15.510204, 0.0000, 0.0000, 0.0000);
  118.     CreateObject(2780, 100.208839, 2508.476563, 15.484375, 0.0000, 0.0000, 0.0000);
  119.     CreateObject(2780, 103.969795, 2509.019287, 15.484375, 0.0000, 0.0000, 0.0000);
  120.     CreateObject(2780, 108.672318, 2502.731934, 15.484375, 0.0000, 0.0000, 0.0000);
  121.     CreateObject(2780, 93.549515, 2498.805176, 15.484375, 0.0000, 0.0000, 0.0000);
  122.     CreateObject(2780, 83.382881, 2497.754639, 15.484375, 0.0000, 0.0000, 0.0000);
  123.     CreateObject(2780, 75.981537, 2499.653076, 15.484375, 0.0000, 0.0000, 0.0000);
  124.     CreateObject(2780, 72.947968, 2496.647949, 15.484375, 0.0000, 0.0000, 0.0000);
  125.     CreateObject(2780, 67.225632, 2497.041016, 15.484375, 0.0000, 0.0000, 0.0000);
  126.     CreateObject(2780, 54.162510, 2500.242188, 15.484375, 0.0000, 0.0000, 0.0000);
  127.     CreateObject(2780, 55.870213, 2496.486816, 15.484375, 0.0000, 0.0000, 0.0000);//tot hier
  128.     CreateObject(7025, -59.270348, 2528.258301, 18.912155, 0.0000, 0.0000, 78.7500);
  129.  
  130.     MiniGun[1] = CreatePickup(362, 22, -49.2231,2413.7119,18.1405, -1);
  131.     MiniGun[2] = CreatePickup(362, 22, -88.1400,2418.7083,16.1507, -1);
  132.     MiniGun[3] = CreatePickup(362, 22, -80.2826,2468.0244,16.6070, -1);
  133.     MiniGun[4] = CreatePickup(362, 22, -35.4149,2474.6997,16.6070, -1);
  134.     MiniGun[5] = CreatePickup(362, 22, -24.4378,2469.4041,16.6070, -1);
  135.     MiniGun[6] = CreatePickup(362, 22, -32.3504,2499.9739,16.6070, -1);
  136.     MiniGun[7] = CreatePickup(362, 22, -85.0998,2529.8872,16.6070, -1);
  137.     MiniGun[8] = CreatePickup(362, 22, 22.0355,2522.2053,16.6070, -1);
  138.     MiniGun[9] = CreatePickup(362, 22, 35.6325,2426.7192,16.6070, -1);
  139.  
  140.     return 1;
  141. }
  142.  
  143. public OnPlayerConnect(playerid)
  144. {
  145.     SetupPlayerForClassSelection(playerid);
  146.     return 1;
  147. }
  148. public OnPlayerRequestSpawn(playerid)
  149. {
  150.     SetupPlayerForClassSelection(playerid);
  151.     return 1;
  152. }
  153.  
  154. public OnGameModeExit()
  155. {
  156.     return 1;
  157. }
  158.  
  159. public OnPlayerDeath(playerid, killerid, reason)
  160. {
  161.     SendDeathMessage(killerid,playerid,reason);
  162.     new name[MAX_PLAYER_NAME],kname[MAX_PLAYER_NAME], string[128];
  163.     GetPlayerName(killerid, kname, sizeof(kname));
  164.     GetPlayerName(playerid, name, sizeof(name));
  165.     if(killerid==INVALID_PLAYER_ID)
  166.     {
  167.     format(string, sizeof(string), "%s did suicide. his score will be reduced by 1",name);
  168.     SendClientMessageToAll(COLOR_DEATHMESSAGE, string);
  169.     if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(killerid) - 1);
  170.     }
  171.     else if(playerid!=killerid)
  172.     {
  173.     format(string, sizeof(string), "%s has killed %s, %s will be awarded 1 score",kname, name, kname);
  174.     SendClientMessageToAll(COLOR_DEATHMESSAGE, string);
  175.     if(killerid != INVALID_PLAYER_ID){ SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);}
  176.     }
  177.     return 1;
  178. }
  179.  
  180. public OnPlayerSpawn(playerid)
  181. {
  182.     SetPlayerArmour(playerid, 100.0);
  183.     {
  184.  
  185.         switch(random(6))
  186.         {
  187.             case 0:
  188.             {
  189.             SetPlayerPos(playerid,-89.6592,2440.7383,15.4210);
  190.             }
  191.             case 1:
  192.             {
  193.             SetPlayerPos(playerid,22.6497,2502.9558,16.4922);
  194.             }
  195.             case 2:
  196.             {
  197.             SetPlayerPos(playerid,32.0872,2540.2114,16.4921);
  198.             }
  199.             case 3:
  200.             {
  201.             SetPlayerPos(playerid,-60.4238,2528.0222,16.4844);
  202.             }
  203.             case 4:
  204.             {
  205.             SetPlayerPos(playerid,-85.6545,2477.9131,16.4844);
  206.             }
  207.             case 5:
  208.             {
  209.             SetPlayerPos(playerid,-7.7515,2422.1787,16.4627);
  210.             }
  211.         }
  212.     }
  213.     return 1;
  214. }
  215.  
  216. public OnPlayerCommandText(playerid, cmdtext[])
  217. {
  218.     if (strcmp("/respawn", cmdtext, true, 10) == 0)
  219.     {
  220.         if(Respawned[playerid]==0)
  221.         {
  222.             Respawned[playerid] = 1;
  223.             SetTimerEx("ResetSpawn",15000,false,"u",playerid);
  224.             SetPlayerArmour(playerid, 100.0);
  225.             SetPlayerHealth(playerid, 100.0);
  226.             SetPlayerAmmo(playerid,7,3000);
  227.             switch(random(6))
  228.             {
  229.                 case 0:
  230.                 {
  231.                 SetPlayerPos(playerid,-89.6592,2440.7383,15.4210);
  232.                 }
  233.                 case 1:
  234.                 {
  235.                 SetPlayerPos(playerid,22.6497,2502.9558,16.4922);
  236.                 }
  237.                 case 2:
  238.                 {
  239.                 SetPlayerPos(playerid,32.0872,2540.2114,16.4921);
  240.                 }
  241.                 case 3:
  242.                 {
  243.                 SetPlayerPos(playerid,-60.4238,2528.0222,16.4844);
  244.                 }
  245.                 case 4:
  246.                 {
  247.                 SetPlayerPos(playerid,-85.6545,2477.9131,16.4844);
  248.                 }
  249.                 case 5:
  250.                 {
  251.                 SetPlayerPos(playerid,-7.7515,2422.1787,16.4627);
  252.                 }
  253.             }
  254.         }
  255.         else
  256.         {
  257.         SendClientMessage(playerid,COLOR_ERROR,"you have respawned already, wait a few seconds before doing it again");
  258.         }
  259.     }
  260.     return 1;
  261. }
  262.  
  263. public OnPlayerPickUpPickup(playerid, pickupid)
  264. {
  265.     if(pickupid == MiniGun[1]) GivePlayerWeapon(playerid,38,500);
  266.     if(pickupid == MiniGun[2]) GivePlayerWeapon(playerid,38,500);
  267.     if(pickupid == MiniGun[3]) GivePlayerWeapon(playerid,38,500);
  268.     if(pickupid == MiniGun[4]) GivePlayerWeapon(playerid,38,500);
  269.     if(pickupid == MiniGun[5]) GivePlayerWeapon(playerid,38,500);
  270.     if(pickupid == MiniGun[6]) GivePlayerWeapon(playerid,38,500);
  271.     if(pickupid == MiniGun[7]) GivePlayerWeapon(playerid,38,500);
  272.     if(pickupid == MiniGun[8]) GivePlayerWeapon(playerid,38,500);
  273.     if(pickupid == MiniGun[9]) GivePlayerWeapon(playerid,38,500);
  274.     return 1;
  275. }
  276.  
  277. public ResetSpawn(playerid)
  278. {
  279.     Respawned[playerid] = 0;
  280.     return 1;
  281. }
Add Comment
Please, Sign In to add comment