Ко всем new добовляем:
PHP код:
new ClimberCheck[MAX_PLAYERS char] = {0, ...};
К public OnPlayerEnterCheckpoint(playerid):
PHP код:
if(ClimberCheck{playerid})
{
DisablePlayerCheckpoint(playerid);
switch(ClimberCheck{playerid})
{
case 1: SetPlayerCheckpoint(playerid,-1958.98,-1676.67,33.89, 4.0);
case 2: SetPlayerCheckpoint(playerid,-1982.91,-1704.02,57.64, 4.0);
case 3: SetPlayerCheckpoint(playerid,-2003.89,-1726.12,86.90, 5.0);
case 4: SetPlayerCheckpoint(playerid,-2004.35,-1467.02,85.22, 4.0);
case 5: SetPlayerCheckpoint(playerid,-2040.70,-1508.01,125.24, 4.0);
case 6: SetPlayerCheckpoint(playerid,-2097.85,-1729.39,182.82, 5.0);
case 7: SetPlayerCheckpoint(playerid,-2172.28,-1841.29,219.06, 2.0);
case 8: SetPlayerCheckpoint(playerid,-2173.45,-1904.01,234.75, 2.0);
case 9: SetPlayerCheckpoint(playerid,-2296.10,-1944.24,276.97, 2.0);
case 10: SetPlayerCheckpoint(playerid,-2447.97,-1933.13,302.63, 2.0);
case 11: SetPlayerCheckpoint(playerid,-2605.27,-1700.34,328.02, 2.0);
case 12: SetPlayerCheckpoint(playerid,-2552.50,-1616.10,378.96, 2.0);
case 13: SetPlayerCheckpoint(playerid,-2466.64,-1538.05,408.28, 2.0);
case 14: SetPlayerCheckpoint(playerid,-2407.79,-1581.02,488.48, 2.0);
case 15: SetPlayerCheckpoint(playerid,-2231.19,-1739.42,481.46, 2.0);
case 16:
{
ClimberCheck{playerid} = 0;
SendClientMessage(playerid,0x006ED9AA, "{ffa200}** {ff0000}Ты получил за свою работу: {ffffff}10 000$");
GameTextForPlayer(playerid,"~G~+10000$",3000,5);
GivePlayerMoney(playerid, 10000);
return 1;
}
}
ClimberCheck{playerid}++;
return 1;
}
Теперь к public OnGameModeInit():
PHP код:
Create3DTextLabel("{ffa200}Работа:{ffffff} Альпинист\n{ffa200} Для устройства введите {ffffff}/alpinist\n{ffa200} Зарплата:{Ffffff} 10.000$",COLOR_RED,-1979.26,-1810.37,37.81,80.0,0,0);
CreatePickup(1274,23,-1979.26,-1810.37,37.81,-1);// Альпинист
AddStaticVehicleEx(468,-2238.39990234,-1712.90002441,480.60000610,42.00000000,6,1,15); //Sanchez
AddStaticVehicleEx(468,-2238.39990234,-1715.09997559,480.60000610,41.99523926,6,1,15); //Sanchez
AddStaticVehicleEx(568,-2237.10009766,-1719.00000000,480.79998779,40.00000000,-1,-1,15); //Bandito
AddStaticVehicleEx(557,-2244.19921875,-1744.09960938,480.39999390,357.99499512,-1,-1,15); //Monster B
CreateObject(16337,-1980.59997559,-1811.69995117,36.79999924,0.00000000,0.00000000,224.00000000); //object(des_cranecontrol) (2)
CreateObject(11496,-2300.39990234,-1940.90002441,278.79998779,0.00000000,0.00000000,186.00000000); //object(des_wjetty) (2)
Далее добавляем к public OnPlayerCommandText(playerid, cmdtext[])
PHP код:
if(strcmp(cmdtext, "/alpinist",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,-1979.26,-1810.37,37.81) == 0)
return 1;
SetPlayerCheckpoint(playerid,-1958.98,-1676.67,33.89, 2.0);
ClimberCheck{playerid} = 1;
SendClientMessage(playerid,0xA0D7EAFF, "•••> {5EF28D}Отлично, Вы нам подходите!");
return SendClientMessage(playerid,0x6DA7BCFF, "•••> {51D37A}Чтобы получить вознаграждение в виде {FFFFFF}10.000$ {51D37A}следуйте по меткам.");
}
Автор: JoinT.
Доработка: Daniel_Cortez.
Работа находится неподалёку от шахты, как на Адвансе