SHARE
TWEET

Untitled

mironovdga May 6th, 2020 726 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CMD:eng(playerid, params[])
  2. {
  3.     if(PlayerLogged[playerid] == false) return 1;
  4.     if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
  5.     if(GetPVarInt(playerid, "InShop") || InShop[playerid]) return 1;
  6.     new cars = 0;
  7.     for(new i; i != sizeof(BE_Bad_Vehs); i++)
  8.     {
  9.         if(GetVehicleModel(GetPlayerVehicleID(playerid)) == BE_Bad_Vehs[i]) cars++;
  10.     }
  11.     if(Bonnet[GetPlayerVehicleID(playerid)] == true) return SendClientMessage(playerid, COLOR_GREY, "Дождитесь, пока автомеханик отремонтирует транспорт!");
  12.     if(IsAPlane(GetPlayerVehicleID(playerid)) || IsAVel(GetPlayerVehicleID(playerid))) return 1;
  13.     if(Fuel[GetPlayerVehicleID(playerid)] <= 0 && GetVehicleModel(GetPlayerVehicleID(playerid)) == 0 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 462) return SendClientMessage(playerid, COLOR_GREY, CarHasNoFuel);
  14.     new Float:vehhealth;
  15.     GetVehicleHealth(GetPlayerVehicleID(playerid), vehhealth);
  16.     if(vehhealth <= 400 && cars == 0) return SendClientMessage(playerid, COLOR_GREY, CarIsBroken);
  17.     if(Engine[GetPlayerVehicleID(playerid)] == false)
  18.     {
  19.         GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
  20.         SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
  21.         Engine[GetPlayerVehicleID(playerid)] = true;
  22.     }
  23.     else
  24.     {
  25.         GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
  26.         SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
  27.         Engine[GetPlayerVehicleID(playerid)] = false;
  28.     }
  29.     return 1;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top