»
Привет Гость:)

Language: ENG / UA / RU / CN / AR |

[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » SA-MP [ PAWNO ] San Andreas Multiplayer » [GM] » Parkour Race
Parkour Race
BELIYДата: Ср, 18.07.2012, 03:44 | Сообщение # 1
:)
Группа: Администратор
Сообщений: 742
Статус: Offline
Code
#include <a_samp>
#define red 0xFF0000FF
#define yellow 0xFFFF00AA
#define green 0x33FF33AA
new Para;
new SecondIsland[MAX_PLAYERS];
new Stats[MAX_PLAYERS];

main()
{
     print("\n//------------------------------//");
     print("         Parkour Race         ");
     print("//------------------------------//\n");
}

public OnGameModeInit()
{
     ShowPlayerMarkers(1);
     ShowNameTags(1);
     UsePlayerPedAnims();
     EnableTirePopping(0);
     AllowInteriorWeapons(1);
     EnableZoneNames(0);
     EnableStuntBonusForAll(1);
     SetWorldTime(12);
     SetWeather(10);
     SetGameModeText("Parkour");

     AddPlayerClass(299, 4379.4395, -1338.8160, 46.5095, 92.2321, 0, 0, 0, 0, 0, 0);

     CreateObject(17944, 4297.042969, -1318.828491, 26.259535, 0.0000, 0.0000, 270.0000);
     CreateObject(17944, 4136.693848, -1346.986084, 26.862648, 0.0000, 0.0000, 78.7500);
     CreateObject(17944, 4174.289063, -1449.887451, 22.815914, 0.0000, 0.0000, 191.2500);
     CreateObject(1437, 4179.455566, -1451.715454, 14.430271, 328.2008, 0.0000, 191.2500);
     CreateObject(1437, 4178.923828, -1449.004272, 11.331102, 328.2008, 0.0000, 191.2500);
     CreateObject(3663, 4196.202637, -1500.114014, 26.925531, 0.0000, 0.0000, 101.2500);
     CreateObject(3663, 4191.470703, -1505.883057, 29.821692, 50.7067, 342.8113, 95.2340);
     CreateObject(3663, 4195.508301, -1496.185425, 24.687506, 0.0000, 0.0000, 101.2500);
     CreateObject(3663, 4195.029297, -1493.353027, 23.088598, 0.0000, 0.0000, 101.2500);
     CreateObject(3663, 4153.654785, -1512.584839, 29.471697, 50.7067, 342.8113, 263.9839);
     CreateObject(3663, 4164.631348, -1568.238037, 29.461948, 50.7067, 342.8113, 185.2339);
     CreateObject(3663, 4158.786621, -1565.981934, 29.203272, 50.7067, 342.8113, 117.7338);
     CreateObject(3663, 4157.829590, -1561.429565, 28.228245, 50.7067, 342.8113, 117.7338);
     CreateObject(17901, 4148.522461, -1518.913330, 20.577833, 0.0000, 0.0000, 101.2500);
     CreateObject(17859, 4106.538574, -1522.629395, 31.026749, 0.0000, 0.0000, 101.2500);
     CreateObject(17804, 4061.825195, -1541.412598, 25.583408, 0.0000, 0.0000, 11.2500);
     CreateObject(18367, 4082.753906, -1527.618286, 28.049229, 0.0000, 0.0000, 281.2500);
     CreateObject(18367, 4259.456543, -1348.807129, 25.226387, 334.2169, 0.0000, 87.6625);
     CreateObject(18367, 4213.067383, -1342.658325, 10.460730, 334.2169, 0.0000, 79.9276);
     CreateObject(18367, 4116.915527, -1397.356812, 13.233803, 334.2169, 0.0000, 87.6625);
     CreateObject(18367, 4138.836914, -1396.049927, 12.250731, 334.2169, 0.0000, 286.1927);
     CreateObject(3663, 4139.267090, -1520.501465, 27.629364, 359.1405, 0.8594, 14.7651);
     CreateObject(2780, 4210.212402, -1349.068481, 16.078766, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4212.779785, -1335.463257, 16.073586, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4139.306152, -1396.096313, 12.032031, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4149.639160, -1393.858887, 12.032030, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4192.505371, -1504.240479, 28.575859, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4162.151367, -1564.840454, 27.987633, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4152.100586, -1512.333740, 28.065914, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4120.735840, -1526.482422, 28.804396, 0.0000, 0.0000, 175.2211);
     CreateObject(2780, 4119.854980, -1521.042114, 28.804396, 0.0000, 0.0000, 0.0000);
     CreateObject(2780, 4103.582520, -1529.908203, 28.583334, 0.0000, 0.0000, 175.2211);
     CreateObject(2780, 4102.371094, -1524.641846, 28.542252, 0.0000, 0.0000, 16.3294);
     CreateObject(2780, 4070.101074, -1530.358643, 31.844431, 0.0000, 0.0000, 16.3294);
     CreateObject(4564, 4049.161133, -2284.628418, 108.964973, 0.0000, 0.0000, 0.0000);
     CreateObject(6351, 3990.205322, -2292.363770, 14.637174, 0.0000, 0.0000, 157.5000);
     CreateObject(17690, 3918.156738, -2292.574219, -6.724265, 343.6707, 0.0000, 270.0000);
     CreateObject(17067, 3851.284912, -2292.912842, 15.892159, 0.0000, 0.0000, 303.7500);
     CreateObject(10634, 3805.942871, -2318.135986, 12.523985, 0.0000, 0.0000, 191.2500);
     CreateObject(9904, 3802.340576, -2396.220215, 20.329367, 0.0000, 0.0000, 236.2501);
     CreateObject(9581, 3824.391113, -2487.455322, 34.709778, 0.0000, 0.0000, 11.2500);

     Para = CreatePickup(371,2,4073.7278,-1613.9264,26.1166);

     return 1;
}

public OnGameModeExit()
{
     return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
     SetPlayerInterior(playerid,17);
     SetPlayerPos(playerid,486.0409, -9.4562, 1000.6719);
     SetPlayerFacingAngle(playerid, 137.9666);
     SetPlayerCameraPos(playerid, 483.809051, -13.435981, 1000.679687);
     SetPlayerCameraLookAt(playerid, 486.0409, -9.4562, 1000.6719);
     return 1;
}

public OnPlayerConnect(playerid)
{
     new pName[30], string[256];
     GetPlayerName(playerid, pName, 30);
     format(string, 256, "~p~isp.at.ua ~g~Welcome ~n~~r~%s!", pName);
     GameTextForPlayer(playerid,string,4000,1);
     SetPlayerCheckpoint(playerid,3829.7771,-2535.9448,51.0510,3);
     SecondIsland[playerid] = 0;
     return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
     return 1;
}

public OnPlayerSpawn(playerid)
{

     SetPlayerRaceCheckpoint(playerid, 0,4359.2617,-1339.2238,46.5095,4290.7109,-1341.8685,44.5564,10);
     Stats[playerid] = 1;

     SetPlayerTime(playerid,0,0);
     SetPlayerInterior(playerid,0);
     SetCameraBehindPlayer(playerid);
     SetPlayerHealth(playerid,100);
     SetPlayerArmour(playerid,0);
     if (SecondIsland[playerid] == 1){
     SetPlayerPos(playerid,4043.0613,-2301.9531,219.2495);
     GivePlayerWeapon(playerid,46,1);}
     return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
     GameTextForPlayer(playerid,"Wasted",4000,2);
     SendDeathMessage(killerid, playerid, reason);
     return 1;
}

public OnPlayerPickUpPickup(playerid,pickupid)
{
     if (pickupid == Para){
     SetPlayerPos(playerid,4043.0613,-2301.9531,219.2495);
     SendClientMessage(playerid,yellow,"Second Island Checkpoint Reached. Parachute down to the rest of the island to get to the end.");
     GameTextForPlayer(playerid,"~w~Second Island ~n~~r~Checkpoint Reached",3000,5);
     SecondIsland[playerid] = 1;}
     return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
     new pName[30], string[256];
     GetPlayerName(playerid, pName, 30);
     format(string, 256, "%s finished the Parkour Run!", pName);
     SendClientMessageToAll(green,string);
     SendClientMessage(playerid,yellow,"Well done, you made it to the end! You have been taken back to the start.");
     GameTextForPlayer(playerid,"~r~The End",3000,3);
     SetPlayerPos(playerid,4379.4395,-1338.8160,46.5095);
     SetPlayerHealth(playerid,100);
     SecondIsland[playerid] = 0;
     return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{

     switch(Stats[playerid])
     {

          case 1:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4258.2070,-1348.6803,28.4444,4223.9492,-1344.2184,18.7795,10);
               Stats[playerid] = 2;
               return 1;
          }
          case 2:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4166.3052,-1336.5103,17.0396,4140.6714,-1373.6238,13.0320,10);
               Stats[playerid] = 3;
               return 1;
          }
          case 3:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4147.8853,-1402.4131,13.0269,4171.1787,-1439.9709,11.3075,10);
               Stats[playerid] = 4;
               return 1;
          }
          case 4:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4191.4155,-1480.7540,18.8375,4204.8579,-1501.8250,29.0659,10);
               Stats[playerid] = 5;
               return 1;
          }
          case 5:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4207.7876,-1560.2854,29.0659,4166.5381,-1557.4741,29.0659,10);
               Stats[playerid] = 6;
               return 1;
          }
          case 6:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4150.6362,-1521.9700,29.0659,4118.1851,-1524.3262,29.7802,10);
               Stats[playerid] = 7;
               return 1;
          }
          case 7:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4088.9165,-1529.2357,29.5423,4063.9587,-1544.8622,36.3278,10);
               Stats[playerid] = 8;
               return 1;
          }
          case 8:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4067.7537,-1579.0751,33.0754,4072.3677,-1602.6301,26.1166,10);
               Stats[playerid] = 9;
               return 1;
          }
          case 9:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,4042.8801,-2302.2783,219.2495,3951.4131,-2300.1423,12.6606,10);
               Stats[playerid] = 10;
               return 1;
          }
          case 10:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3909.5273,-2294.2517,15.0151,3883.3440,-2293.6270,18.6298,10);
               Stats[playerid] = 11;
               return 1;
          }
          case 11: // Final cps
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3880.5959,-2294.3035,19.4371,3872.9617,-2293.9072,20.4476,10);
               Stats[playerid] = 12;
               return 1;
          }
          case 12:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3859.8015,-2293.2664,19.8894,3813.3289,-2299.2039,16.8286,10);
               Stats[playerid] = 13;
               return 1;
          }
          case 13:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3798.0750,-2316.1975,20.4693,3794.4858,-2338.6128,23.8912,10);
               Stats[playerid] = 14;
               return 1;
          }
          case 14:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3797.2073,-2364.4624,25.3762,3802.2129,-2393.8655,24.7863,10);
               Stats[playerid] = 15;
               return 1;
          }
          case 15:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3808.3438,-2431.1340,26.5403,3812.4709,-2451.1982,30.2176,10);
               Stats[playerid] = 16;
               return 1;
          }
          case 16:
          {
               DisablePlayerRaceCheckpoint(playerid);
               PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
               SetPlayerRaceCheckpoint(playerid, 0,3814.8481,-2462.4292,33.2992,3817.7649,-2476.7126,36.6545,10);
               Stats[playerid] = 17;
               return 1;
          }
          case 17:
          {
             static place;
             place++;
             DisablePlayerRaceCheckpoint(playerid);
             PlayerPlaySound(playerid, 1056, 0.0, 0.0 , 10.0);
             Stats[playerid] = 18;
             new name[MAX_PLAYER_NAME], string[100];
             GetPlayerName(playerid, name, sizeof(name));
             format(string, sizeof(string), "Player %s Has Finshed Race [%d%s]", name, place, (place == 1) ? ("st") : (place == 2) ? ("nd") : (place == 3) ? ("rd") : ("th"));
             SendClientMessageToAll(green, string);
             DisablePlayerCheckpoint(playerid);
             return 1;
          }
     }
     return 1;
}


(''')о___о(''')
-\ '( о_о )' /-
--\ \_Ш_/ /-- ПРЕВЕД !!!!
---l . . . . l--- KF.at.UA
--/ ./ U \. \--
-(„„„)__(„„„)-
:)
 
Форум » SA-MP [ PAWNO ] San Andreas Multiplayer » [GM] » Parkour Race
  • Страница 1 из 1
  • 1
Поиск:


Copyright ISP.at.ua ©® 2012-2019™ V2-версия шаблона | Design by KF.AT.UA ©®™
| |
Myserver.do.am |
Sitemap | Sitemap-forum | Хостинг от uCoz