16.10.2013, 09:43
pawn Код:
if(strcmp(cmd, "/fuel", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new vid = GetPlayerVehicleID(playerid);
if(IsAtGasStation(playerid) && VehicleInfo[vid][pEngineStatus] == 0)
{
ShowPlayerDialog(playerid,291,DIALOG_STYLE_LIST,"Добро пожаловать на заправку!Выберите тип топлива:","Дизель\nAИ 90\nAИ 93\nAИ 95","Выбрать","Отмена");
}
else
{
SendClientMessage(playerid,COLOR_GREY,"[Сервер]: Вы не на АЗС!");
}
}
return true;
}
pawn Код:
VehicleInfo[vid][pEngineStatus] = 1;
pawn Код:
VehicleInfo[vid][pEngineStatus] = 0;
pawn Код:
f(IsAtGasStation(playerid)
pawn Код:
if(IsAtGasStation(playerid) && VehicleInfo[vid][pEngineStatus] == 0)
you'll probably have to get the vehicle's id, so use
pawn Код:
new vid = GetPlayerVehicleID(playerid);