Ко всем new добавляем:
Code: Select all
new polet;
new proba[MAX_PLAYERS];
new probabonus[MAX_PLAYERS]
В public OnPlayerConnect(playerid)
Code: Select all
proba[playerid] = 0;
probabonus[playerid] = 0;
В public OnGameModeInit()
Code: Select all
polet = CreateDynamicPickup(1310,23,-2031.471313,-51.917076,35.371021,-1);
CreateDynamic3DTextLabel("{00ff00}Бейсджампинг\n{FF6600}Хотите полетать?{FFFFFF}\nЦена прыжка\n50$\n{FF6600}Первый прыжок халявный ",0xFEFEFEFE,-2031.471313,-51.917076,36.471021,40.0);
В public OnPlayerDeath(playerid, killerid, reason)
Code: Select all
probabonus[playerid] = 0;//если разбился то бонус обнуляем
В public OnPlayerPickUpPickup(playerid, pickupid)
Code: Select all
if(pickupid == polet) {
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000AA,"У Вас не достаточно денег для полёта.");//проверяем есть ли деньги
if(proba[playerid] == 0)//если первый прыжок то...
{
SendClientMessage(playerid, 0xFF0000AA,"Первый раз бесплатно.");
SetPlayerPos(playerid, -1996.604858, -162.441543, 1507.211669);//телепорт вверх
proba[playerid] = 1;
probabonus[playerid] = 1;
}else{// иначе
GivePlayerMoney(playerid,-50);//плата за прыжок
probabonus[playerid] = 1;
SetPlayerPos(playerid, -1996.604858, -162.441543, 1507.211669);}
return true;
}
В public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
Code: Select all
if (newkeys == KEY_FIRE && GetPlayerWeapon(playerid) == 46 )//если нажата кнопка огонь и у игрока есть парашют
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);//узнаём координаты игрока
if (probabonus[playerid] == 1 && z <= 269.6700) //если не разу не разбился и ниже нижней точти коридора полёта
{
GivePlayerMoney(playerid, 100);//даём денег
SendClientMessage(playerid, 0xFF0000AA,"Поздравляем Вы выиграли 100$");//поздравляем
probabonus[playerid] = 0;//обнуляем бонус
}
return true;
}
- Объекты
Code: Select all
CreateObject(18768, -2027.28, -159.15, 640.28, 0.00, 0.00, 0.00);
CreateObject(18768, -1996.05, -159.15, 640.28, 0.00, 0.00, 0.00);
CreateObject(18768, -2027.30, -221.54, 640.28, 0.00, 0.00, 0.00);
CreateObject(18768, -1965.34, -222.06, 640.28, 0.00, 0.00, 0.00);
CreateObject(18768, -2027.24, -190.36, 640.28, 0.00, 0.00, 0.00);
CreateObject(18753, -2011.44, -142.71, 703.18, 0.00, 90.00, 90.00);
CreateObject(18768, -1996.10, -221.78, 640.28, 0.00, 0.00, 0.00);
CreateObject(18768, -1996.25, -190.50, 640.28, 0.00, 0.00, 0.00);
CreateObject(18753, -1949.01, -205.60, 703.18, 0.00, 90.00, 180.00);
CreateObject(18768, -1964.89, -190.59, 640.28, 0.00, 0.00, 0.00);
CreateObject(18768, -1964.78, -159.17, 640.28, 0.00, 0.00, 0.00);
CreateObject(18753, -2012.03, -142.82, 828.28, 0.00, 90.00, 90.00);
CreateObject(18753, -1949.14, -205.65, 828.22, 0.00, 90.00, 180.00);
CreateObject(18753, -1949.14, -205.65, 953.26, 0.00, 90.00, 180.00);
CreateObject(18753, -2012.03, -142.82, 953.28, 0.00, 90.00, 90.00);
CreateObject(18753, -2012.03, -142.82, 1078.34, 0.00, 90.00, 90.00);
CreateObject(18753, -1949.20, -205.67, 1078.26, 0.00, 90.00, 180.00);
CreateObject(18753, -1949.20, -205.67, 1203.26, 0.00, 90.00, 180.00);
CreateObject(18753, -2012.06, -142.88, 1203.34, 0.00, 90.00, 90.00);
CreateObject(18753, -2012.19, -142.80, 1328.34, 0.00, 90.00, 90.00);
CreateObject(18753, -2012.21, -142.81, 1453.34, 0.00, 90.00, 90.00);
CreateObject(18753, -1949.20, -205.69, 1328.26, 0.00, 90.00, 180.00);
CreateObject(18753, -1949.20, -205.67, 1453.26, 0.00, 90.00, 180.00);
CreateObject(18857, -1965.14, -190.69, 638.14, 0.00, 180.00, 0.00);
CreateObject(18857, -1996.10, -159.10, 638.08, 0.00, 180.00, 0.00);
CreateObject(18857, -2027.22, -190.46, 638.00, 0.00, 180.00, 0.00);
CreateObject(18857, -1996.03, -221.22, 638.14, 0.00, 180.00, 0.00);
CreateObject(18753, -2011.71, -238.41, 703.18, 0.00, 90.00, 90.00);
CreateObject(18753, -2044.22, -178.98, 703.18, 0.00, 90.00, 180.00);
CreateObject(18772, -2028.56, -158.85, 762.56, 0.00, 0.00, 45.00);
CreateObject(18772, -1999.50, -192.67, 762.56, 0.00, 0.00, 135.00);
CreateObject(18772, -1998.68, -190.71, 762.56, 0.00, 0.00, 91.00);
CreateObject(0, -1998.73, -190.73, 762.56, 0.00, 0.00, 0.00);
CreateObject(18753, -2044.25, -194.67, 828.22, 0.00, 90.00, 180.00);
CreateObject(18753, -2009.03, -238.36, 828.28, 0.00, 90.00, 90.00);
CreateObject(18835, -1997.14, -190.41, 879.10, 0.00, 0.00, 0.00);
CreateObject(18753, -1992.10, -237.80, 953.28, 0.00, 90.00, 90.00);
CreateObject(18753, -2043.92, -207.07, 953.26, 0.00, 90.00, 180.00);
CreateObject(18789, -1981.98, -229.26, 1014.55, 0.00, 0.00, 0.00);
CreateObject(18789, -1984.83, -197.23, 1014.55, 0.00, 0.00, 0.00);
CreateObject(18789, -1981.95, -165.19, 1014.55, 0.00, 0.00, 0.00);
CreateObject(18753, -2044.30, -205.49, 1078.26, 0.00, 90.00, 180.00);
CreateObject(18753, -1989.08, -237.78, 1078.34, 0.00, 90.00, 90.00);
CreateObject(18789, -1957.77, -177.58, 1140.00, 0.00, 0.00, 90.00);
CreateObject(18789, -1990.63, -181.87, 1140.00, 0.00, 0.00, 90.00);
CreateObject(18789, -2023.10, -182.54, 1140.00, 0.00, 0.00, 90.00);
CreateObject(18753, -2044.64, -193.34, 1203.26, 0.00, 90.00, 180.00);
CreateObject(18753, -2008.37, -237.85, 1203.34, 0.00, 90.00, 90.00);
CreateObject(18772, -2012.47, -205.73, 1014.00, 0.00, 0.00, 0.00);
CreateObject(18772, -1976.92, -211.06, 1014.00, 0.00, 0.00, 0.00);
CreateObject(18772, -1991.60, -170.88, 1139.00, 0.00, 0.00, 90.00);
CreateObject(18772, -1992.21, -207.58, 1139.00, 0.00, 0.00, 90.00);
CreateObject(7422, -1994.89, -204.85, 1264.46, 0.00, 0.00, 0.00);
CreateObject(18753, -2044.51, -205.86, 1328.26, 0.00, 90.00, 180.00);
CreateObject(18753, -2009.72, -237.69, 1328.34, 0.00, 90.00, 90.00);
CreateObject(7420, -2003.43, -172.48, 1389.94, 0.00, 0.00, 180.00);
CreateObject(18753, -2011.86, -237.77, 1453.34, 0.00, 90.02, 90.00);
CreateObject(18753, -2044.43, -199.54, 1453.26, 0.00, 90.00, 180.00);
CreateObject(18753, -2011.39, -142.76, 578.10, 0.00, 90.00, 90.00);
CreateObject(18753, -1948.79, -205.82, 578.10, 0.00, 90.00, 0.00);
CreateObject(4830, -1998.09, -185.93, 514.30, 0.00, 0.00, 90.00);
CreateObject(18753, -1999.87, -238.39, 578.10, 0.00, 90.00, 90.00);
CreateObject(18753, -2043.85, -176.99, 578.10, 0.00, 90.00, 0.00);
CreateObject(18772, -1998.67, -190.45, 513.68, 0.00, 0.00, 0.00);
CreateObject(18753, -1999.79, -238.47, 453.10, 0.00, 90.00, 90.00);
CreateObject(18753, -1948.81, -200.67, 453.10, 0.00, 90.00, 0.00);
CreateObject(18753, -2008.34, -142.73, 453.10, 0.00, 90.00, 90.00);
CreateObject(10758, -1927.95, -120.49, 390.65, 0.00, 0.00, 0.00);
CreateObject(10758, -1927.35, -260.45, 390.65, 0.00, 0.00, 270.00);
CreateObject(18753, -2043.85, -176.99, 453.10, 0.00, 90.00, 0.00);
CreateObject(10758, -2065.86, -260.27, 390.65, 0.00, 0.00, 180.00);
CreateObject(10758, -2066.40, -121.66, 390.65, 0.00, 0.00, 90.00);
CreateObject(18753, -1999.79, -238.47, 327.98, 0.00, 90.00, 90.00);
CreateObject(18753, -1948.81, -200.67, 327.98, 0.00, 90.00, 0.00);
CreateObject(18753, -2008.34, -142.73, 327.98, 0.00, 90.00, 90.00);
CreateObject(4726, -1968.23, -215.99, 269.67, 0.00, 0.00, -273.00);
CreateObject(18753, -2043.85, -176.99, 327.98, 0.00, 90.00, 0.00);
CreateObject(4726, -2021.11, -217.28, 269.67, 0.00, 0.00, -4.00);
CreateObject(4726, -1969.76, -163.84, 269.67, 0.00, 0.00, 47.00);
CreateObject(4726, -1997.19, -187.36, 269.67, 0.00, 0.00, 91.00);
CreateObject(4726, -2022.88, -162.65, 269.67, 0.00, 0.00, 40.00);
CreateObject(18772, -1996.96, -190.83, 762.56, 0.00, 0.00, 0.00);
CreateObject(16442, -2029.00, -158.60, 1391.85, 0.00, 0.00, 0.00);
CreateObject(16442, -2012.42, -152.39, 1391.85, 0.00, 0.00, -84.00);
CreateObject(16442, -1985.40, -152.89, 1391.85, 0.00, 0.00, 207.00);
CreateObject(16442, -1978.32, -181.81, 1391.85, 0.00, 0.00, 156.00);
CreateObject(16442, -1996.32, -175.87, 1391.85, 0.00, 0.00, -40.00);
CreateObject(16442, -2023.75, -177.01, 1391.85, 0.00, 0.00, 56.00);
CreateObject(11470, -2025.56, -189.85, 1268.06, 0.00, 0.00, 0.00);
CreateObject(11470, -1963.88, -205.35, 1268.06, 0.00, 0.00, 69.00);
CreateObject(11470, -1980.17, -182.99, 1268.06, 0.00, 0.00, -69.00);
CreateObject(11470, -1999.92, -217.13, 1268.06, 0.00, 0.00, 4.00);
CreateObject(18864, -1984.76, -143.22, 291.19, 0.00, 0.00, 0.00);
CreateObject(18864, -2043.35, -175.76, 548.79, 0.00, 0.00, 0.00);
CreateObject(18864, -2043.69, -174.35, 805.19, 0.00, 0.00, 0.00);
CreateObject(18882, -1996.74, -190.25, 1530.24, 0.00, 180.00, 0.00);
CreateObject(11468, -2038.33, -189.48, 1503.94, 0.00, 0.00, 53.92);
CreateObject(11468, -1955.18, -182.51, 1503.94, 0.00, 0.00, 53.92);
CreateObject(11468, -1999.64, -231.79, 1503.94, 0.00, 0.00, 143.92);
CreateObject(5184, -1986.77, -137.55, 1523.87, 0.00, 0.00, -180.00);
CreateObject(14608, -1953.47, -147.22, 1506.70, 0.00, 0.00, 84.00);
CreateObject(14608, -2040.43, -147.13, 1506.70, 0.00, 0.00, 178.00);
CreateObject(14608, -2040.16, -233.44, 1506.70, 0.00, 0.00, -91.00);
CreateObject(14608, -1952.98, -233.30, 1506.70, 0.00, 0.00, 4.00);
CreateObject(3472, -2031.94, -183.37, 1505.33, 0.00, 0.00, 0.00);
CreateObject(3472, -1962.05, -183.46, 1505.33, 0.00, 0.00, 0.00);
CreateObject(3472, -1982.25, -183.53, 1505.33, 0.00, 0.00, 0.00);
CreateObject(3472, -2008.26, -183.39, 1505.33, 0.00, 0.00, 0.00);
CreateObject(18750, -1996.53, -235.59, 1480.45, 88.00, 180.00, 0.00);
CreateObject(5716, -1991.92, -145.88, 1518.39, -0.40, 0.00, 0.00);
CreateObject(3472, -2033.88, -225.67, 1505.33, 0.00, 0.00, 0.00);
CreateObject(3472, -1959.79, -227.82, 1505.33, 0.00, 0.00, 0.00);
CreateObject(3472, -1985.06, -227.96, 1505.33, 0.00, 0.00, 0.00);
CreateObject(3472, -2012.50, -227.73, 1505.33, 0.00, 0.00, 0.00);
Вот и всё. Если у кого то нет парашюта, то можно сделать так