SIRIUS
Умник
Суть: Нужно чтобы одной командой ремонтировать могли 3 фракции №25 №26 №27 но в разных местах и допустим фракция №27 немогла использовать команду на точке фракции № 25 и №26. Вот сама команда, если не трудно помогите. С меня "+" =)
Вот команда:
Вот команда:
PHP:
strcmp(cmd, "/repair", true) == 0)
{
if(PlayerInfo[playerid][pJob] != 2) return SendClientMessage(playerid, COLOR_GREY, "Вы не механик!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "Введите: /repair [id] [цена]");
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(money < 200 || money > 1000)
{
SendClientMessage(playerid, COLOR_GREY, "Нельзя меньше 200, и больше 1000 вирт!");
return true;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(!PlayerToPoint(2.0,playerid,212.2816,1812.2374,21.8672)) return SendClientMessage(playerid, COLOR_GRAD1, "Вы не в Автосервисе");
if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
{
if(playa == playerid)
{
SendClientMessage(playerid, COLOR_GREY, "Вы не можете чинить машину самому себе!");
return true;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Вы предложили %s отремонтировать его машину за %d вирт.",giveplayer,money);
SendClientMessage(playerid, 0x6495EDFF, string);
format(string, sizeof(string), "Механик %s предлагает отремонтировать ваш автомобиль за %d вирт.(( Введите /accept repair, чтобы подтвердить ремонт. ))",sendername,money);
SendClientMessage(playa, 0x6495EDFF, string);
RepairOffer[playa] = playerid;
RepairPrice[playa] = money;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Он не в машине!");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Ошибка] Игрок не найден!");
}
return true;
}
