Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Lost Isle DM
Saturday, June 23rd, 2007 at 10:40:24am MDT 

  1. #include <a_samp>
  2.  
  3. #define COLOR_GREY 0xAFAFAFAA
  4. #define COLOR_GREEN 0x33AA33AA
  5. #define COLOR_YELLOW 0xFFFF00AA
  6.  
  7. new Float:RandomSpawns[][4] =
  8. {
  9.         {-724.4068,2502.0046,282.0584,178.8919},
  10.         {-694.5940,2494.8718,282.0549,179.5186},
  11.         {-694.4985,2471.9792,278.9982,163.8517},
  12.         {-729.4271,2452.3093,279.0397,161.6583},
  13.         {-728.0261,2428.7314,279.1953,327.3898},
  14.         {-697.4846,2419.3376,279.2008,328.0165},
  15.         {-686.4645,2439.8010,279.0987,17.5236},
  16.         {-671.2247,2432.6826,279.1481,39.4338},
  17.         {-692.5183,2407.4116,282.0569,12.1734},
  18.         {-721.4327,2408.7429,282.0563,63.2472},
  19.         {-741.1788,2410.1897,282.0552,301.3594}
  20. };
  21.  
  22. main()
  23. {
  24.         print(" Lost Isle DM - Created by Ramjet.");
  25.         print(" Compatibility: SA-MP v0.2 or Higher.\n");
  26. }
  27.  
  28. public OnGameModeInit()
  29. {
  30.         SetGameModeText("Lost Isle DM");
  31.         AddAllClass(-707.366211, 2450.564209, 282.334412, 360.000000, -1, -1, 33, 50, -1, -1);
  32.        
  33.         // Objects:
  34.         CreateObject(8398, -680.859497, 2451.985107, 279.606995, 0, 0, 0);
  35.         CreateObject(8483, -708.348816, 2503.587158, 285.724823, 0, 352.2651, 269.7591);
  36.         CreateObject(8483, -708.560547, 2400.063232, 285.374908, 0, 349.6868, 94.4341);
  37.         CreateObject(6293, -642.649414, 2456.796631, 295.469208, 0, 0, 329.0603);
  38.         CreateObject(6293, -766.171875, 2461.621094, 294.741119, 0, 0, 162.6149);
  39.         CreateObject(3524, -721.891357, 2402.273682, 283.979645, 0, 0, 171.8874);
  40.         CreateObject(3524, -692.559814, 2402.973389, 284.390900, 0, 0, 171.8874);
  41.         CreateObject(3524, -695.157104, 2498.256348, 283.964661, 0, 0, 5.2604);
  42.         CreateObject(3524, -724.306152, 2498.991211, 283.987640, 0, 0, 5.2604);
  43.         CreateObject(4811, -708.028809, 2382.715088, 291.887787, 0, 0, 241.5018);
  44.         CreateObject(7247, -734.736877, 2531.420898, 253.172089, 354.8434, 355.7028, 86.0475);
  45.         CreateObject(4811, -704.909241, 2520.727783, 290.483673, 0, 0, 67.9993);
  46.         CreateObject(8398, -737.045837, 2451.613525, 279.609863, 0, 0, 180.4818);
  47.         CreateObject(4811, -632.965149, 2500.597168, 290.667938, 0, 0, 42.2163);
  48.         CreateObject(621, -683.088013, 2440.645508, 278.059631, 0, 0, 0);
  49.         CreateObject(621, -694.979431, 2463.410156, 278.419708, 0, 0, 0);
  50.         CreateObject(621, -732.664429, 2442.096436, 278.111969, 0, 0, 0);
  51.         CreateObject(641, -723.924500, 2453.794434, 275.721008, 0, 0, 0);
  52.         CreateObject(641, -689.822449, 2440.169434, 275.867493, 0, 0, 0);
  53.         CreateObject(641, -679.752075, 2478.947754, 275.924927, 0, 0, 0);
  54.         CreateObject(641, -719.221069, 2474.809814, 275.874939, 0, 0, 0);
  55.         CreateObject(655, -698.117188, 2429.038574, 278.291077, 0, 0, 0);
  56.         CreateObject(655, -725.559875, 2425.104248, 278.259216, 0, 0, 0);
  57.         CreateObject(655, -725.386841, 2469.774902, 278.246765, 0, 0, 0);
  58.         CreateObject(655, -697.877808, 2476.218018, 278.224518, 0, 0, 0);
  59.         CreateObject(621, -737.776733, 2485.073242, 277.867493, 0, 0, 0);
  60.         CreateObject(619, -708.361206, 2482.923828, 281.201691, 0, 0, 0);
  61.         CreateObject(619, -672.064270, 2453.298584, 278.311523, 0, 0, 0);
  62.         CreateObject(619, -732.439270, 2423.371094, 278.196594, 0, 0, 227.7508);
  63.         CreateObject(745, -670.253235, 2475.704590, 278.647736, 0, 0, 0);
  64.         CreateObject(745, -687.694580, 2479.156006, 278.762054, 0, 0, 0);
  65.         CreateObject(745, -725.588318, 2485.964844, 278.792267, 0, 0, 0);
  66.         CreateObject(745, -729.236389, 2462.975586, 278.626221, 0, 0, 0);
  67.         CreateObject(745, -742.570435, 2436.854492, 278.810333, 0, 0, 0);
  68.         CreateObject(745, -727.457886, 2421.394531, 278.601227, 0, 0, 0);
  69.         CreateObject(745, -687.588318, 2448.038818, 278.648651, 0, 0, 0);
  70.         CreateObject(750, -672.337280, 2425.242920, 278.617859, 0, 0, 0);
  71.         CreateObject(750, -723.628601, 2446.368896, 278.480347, 0, 0, 0);
  72.         CreateObject(750, -705.821655, 2462.435059, 280.479340, 0, 0, 0);
  73.         CreateObject(647, -684.688110, 2458.488037, 279.963745, 0, 0, 0);
  74.         CreateObject(647, -743.034607, 2459.461426, 280.043335, 0, 0, 0);
  75.         CreateObject(647, -724.378357, 2430.131836, 279.942017, 0, 0, 0);
  76.         CreateObject(647, -684.409607, 2426.191162, 279.917114, 0, 0, 0);
  77.         CreateObject(647, -669.972107, 2444.101074, 279.983978, 0, 0, 0);
  78.         CreateObject(647, -678.031189, 2470.950439, 280.047943, 0, 0, 0);
  79.         CreateObject(679, -739.441711, 2471.108643, 278.255676, 0, 0, 0);
  80.         CreateObject(679, -735.252319, 2436.624756, 278.239380, 0, 0, 0);
  81.         CreateObject(679, -704.853271, 2432.847656, 279.903290, 0, 0, 0);
  82.         CreateObject(679, -710.665649, 2428.693604, 280.952850, 0, 0, 0);
  83.         CreateObject(679, -683.870422, 2473.365723, 278.242157, 0, 0, 0);
  84.         CreateObject(702, -678.912170, 2447.744873, 278.783051, 0, 0, 0);
  85.         CreateObject(702, -736.548279, 2446.462646, 278.770599, 0, 0, 0);
  86.        
  87.         // Pickups:
  88.        
  89.         AddStaticPickup(352, 2, -709.3766,2506.1084,282.0552); // Mac-10
  90.         AddStaticPickup(350, 2, -675.0344,2494.8127,282.0449); // Sawnoff
  91.         AddStaticPickup(339, 2, -751.1165,2511.6829,282.0552); // Katana
  92.         AddStaticPickup(351, 2, -720.3621,2466.8384,278.8192); // Combat Shotgun
  93.         AddStaticPickup(359, 2, -706.1094,2399.7603,282.0552); // Rocket Launcher
  94.         AddStaticPickup(342, 2, -721.3221,2422.3320,279.0476); // Grenades
  95.         AddStaticPickup(356, 2, -708.9437,2446.4280,281.9866); // M4
  96.         AddStaticPickup(358, 2, -654.0292,2392.8083,309.8208); // Sniper Rifle
  97.        
  98.         // Gamemode Settings:
  99.        
  100.         SetWeather(9);
  101.         ShowPlayerMarkers(0);
  102.         ShowNameTags(1);
  103.         return 1;
  104. }
  105.  
  106. AddAllClass(Float:x,Float:y,Float:z,Float:r,w1,a1,w2,a2,w3,a3)
  107.         for(new i; i < 300; i++)
  108.             if(IsValidSkin(i)) AddPlayerClass(i,x,y,z,r,w1,a1,w2,a2,w3,a3);
  109.  
  110. IsValidSkin(skinid)
  111. {
  112.         #define MAX_BAD_SKINS   22
  113.  
  114.         new badSkins[MAX_BAD_SKINS] = {
  115.                 3, 4, 5, 6, 8, 42, 65, 74, 86,
  116.                 119, 149, 208, 265, 266, 267,
  117.                 268, 269, 270, 271, 272, 273, 289
  118.         };
  119.  
  120.         if  (skinid < 0 || skinid > 299) return false;
  121.         for (new i = 0; i < MAX_BAD_SKINS; i++) {
  122.             if (skinid == badSkins[i]) return false;
  123.         }
  124.  
  125.         #undef MAX_BAD_SKINS
  126.         return true;
  127. }
  128.  
  129. public OnGameModeExit()
  130. {
  131.         print("Lost Isle DM Unloaded.");
  132.         return 1;
  133. }
  134.  
  135. public OnPlayerRequestClass(playerid, classid)
  136. {
  137.         SetPlayerPos(playerid, -708.5266,2424.9944,282.0800);
  138.         SetPlayerFacingAngle(playerid, 3.5683);
  139.         SetPlayerCameraPos(playerid, -708.7674,2430.9563,282.0489);
  140.         SetPlayerCameraLookAt(playerid, -708.5266,2424.9944,282.0800);
  141.         ApplyAnimation(playerid, "benchpress", "gym_bp_celebrate", 4.000000, 1, 1, 1, 1, -1);
  142.         return 1;
  143. }
  144.  
  145. public OnPlayerRequestSpawn(playerid)
  146. {
  147.         ClearAnimations(playerid);
  148.         return 1;
  149. }
  150.  
  151. public OnPlayerConnect(playerid)
  152. {
  153.         new string[128], pname[MAX_PLAYER_NAME];
  154.         GetPlayerName(playerid, pname, sizeof(pname));
  155.         format(string, sizeof(string), "[join] %s has joined the server.", pname);
  156.     SendClientMessageToAll(COLOR_GREY, string);
  157.     return 1;
  158. }
  159.  
  160. public OnPlayerDisconnect(playerid, reason)
  161. {
  162.     new string[128], pname[MAX_PLAYER_NAME];
  163.         GetPlayerName(playerid, pname, sizeof(pname));
  164.         format(string, sizeof(string), "[part] %s has left the server.", pname);
  165.     SendClientMessageToAll(COLOR_GREY, string);
  166.     return 1;
  167. }
  168.  
  169. public OnPlayerSpawn(playerid)
  170. {
  171.         SetPlayerRandomSpawn(playerid);
  172.         return 1;
  173. }
  174.  
  175. SetPlayerRandomSpawn(playerid)
  176. {
  177.         new rand = random(sizeof(RandomSpawns));
  178.         SetPlayerPos(playerid, RandomSpawns[rand][0], RandomSpawns[rand][1], RandomSpawns[rand][2]);
  179.         SetPlayerFacingAngle(playerid, RandomSpawns[rand][3]);
  180. }
  181.  
  182. public OnPlayerDeath(playerid, killerid, reason)
  183. {
  184.         SendDeathMessage(killerid, playerid, reason);
  185.         if(killerid == INVALID_PLAYER_ID)
  186.                 SetPlayerScore(playerid, GetPlayerScore(playerid) - 1); // Punish Suiciders.
  187.         else
  188.                 SetPlayerScore(killerid, GetPlayerScore(playerid) + 1); // Reward Killers.
  189.         return 1;
  190. }
  191.  
  192. public OnPlayerCommandText(playerid, cmdtext[])
  193. {
  194.         if (strcmp("/help", cmdtext, true, 10) == 0)
  195.         {
  196.                 SendClientMessage(playerid, COLOR_GREEN, "Lost Isle v1.0 by Ramjet");
  197.                 SendClientMessage(playerid, COLOR_YELLOW, "This is a deathmatch mode, located in the beautiful Lost Isle.");
  198.                 SendClientMessage(playerid, COLOR_YELLOW, "Your objective is to achieve the most kills.");
  199.                 SendClientMessage(playerid, COLOR_YELLOW, "You will be penalised for commiting suicide, however '/kill' is enabled.");
  200.                 SendClientMessage(playerid, COLOR_YELLOW, "Have fun. :D");
  201.                 return 1;
  202.         }
  203.         if (strcmp("/kill", cmdtext, true, 10) == 0)
  204.         {
  205.             SetPlayerHealth(playerid, 0.0);
  206.             return 1;
  207.         }
  208.         return 0;
  209. }

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

fantasy-obligation
fantasy-obligation