KocMoHaBT
Умник
Еще раз привет всем...
Еще один вопрос возник...
Как сделать чтобы когда выходишь из тягача чекпоинт пропадал и оправка груза отменялась...
А Прицеп чтобы респавнулся, когда ты вышел из тягача...
Еще один вопрос возник...
PHP:
else if(CP[playerid]==79)
{
new carid = GetPlayerVehicleID(playerid);
new gTrailer = GetVehicleTrailer(carid);
if(!IsTrailerAttachedToVehicle(carid))
{
format(string, sizeof(string), "Вы не прицепили груз!");
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
PlayerInfo[playerid][pDeliverySkill] ++;
if(PlayerInfo[playerid][pDeliverySkill] == 50)
{ SendClientMessage(playerid, COLOR_YELLOW, "Ваш скилл дальнобойшика - 2."); }
else if(PlayerInfo[playerid][pDeliverySkill] == 100)
{ SendClientMessage(playerid, COLOR_YELLOW, "Ваш скилл дальнобойщика - 3."); }
else if(PlayerInfo[playerid][pDeliverySkill] == 200)
{ SendClientMessage(playerid, COLOR_YELLOW, "Ваш скилл дальнобойщика - 4."); }
else if(PlayerInfo[playerid][pDeliverySkill] == 400)
{ SendClientMessage(playerid, COLOR_YELLOW, "Ваш скилл дальнобойщика - 5."); }
new level = PlayerInfo[playerid][pDeliverySkill];
if(level >= 0 && level <= 50)
{
new rand = random(sizeof(DELIVERY1));
new dropcash = DELIVERY1[rand];
format(string, sizeof(string), "Вы отвезли груз за $%d.", dropcash);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Фура была разгружена");
PlayerInfo[playerid][pMoney] += dropcash;
PlayerOnMission[playerid] = 0;
SetVehicleToRespawn(gTrailer);
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(level >= 51 && level <= 100)
{
new rand = random(sizeof(DELIVERY2));
new dropcash = DELIVERY2[rand];
format(string, sizeof(string), "Вы отвезли груз за $%d.", dropcash);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Фура была разгружена");
PlayerInfo[playerid][pMoney] += dropcash;
PlayerOnMission[playerid] = 0;
SetVehicleToRespawn(gTrailer);
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(level >= 101 && level <= 200)
{
new rand = random(sizeof(DELIVERY3));
new dropcash = DELIVERY3[rand];
format(string, sizeof(string), "Вы отвезли груз за $%d.", dropcash);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Фура была разгружена");
PlayerInfo[playerid][pMoney] += dropcash;
PlayerOnMission[playerid] = 0;
SetVehicleToRespawn(gTrailer);
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(level >= 201 && level <= 400)
{
new rand = random(sizeof(DELIVERY4));
new dropcash = DELIVERY4[rand];
format(string, sizeof(string), "Вы отвезли груз за $%d.", dropcash);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Фура была разгружена");
PlayerInfo[playerid][pMoney] += dropcash;
PlayerOnMission[playerid] = 0;
SetVehicleToRespawn(gTrailer);
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(level >= 401)
{
new money = 20000;
format(string, sizeof(string), "Вы отвезли груз за $%d.", money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Фура была разгружена");
PlayerInfo[playerid][pMoney] += money;
PlayerOnMission[playerid] = 0;
SetVehicleToRespawn(gTrailer);
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
}
А Прицеп чтобы респавнулся, когда ты вышел из тягача...
