Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <progress3>
- #include <zcmd>
- //=====================//
- #define HOLDING(%0) \
- ((newkeys & (%0)) == (%0))
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- //=====================//
- new Text:Vehiculo[MAX_PLAYERS],
- Text:Velocidad[MAX_PLAYERS],
- Text:Espacio[MAX_PLAYERS],
- Text:Espacio2[MAX_PLAYERS],
- Text:Gasolina[MAX_PLAYERS],
- Text:Espacio3[MAX_PLAYERS],
- Text:Espacio4[MAX_PLAYERS],
- Text:Estado[MAX_PLAYERS],
- Text:Espacio5[MAX_PLAYERS],
- Text:Espacio6[MAX_PLAYERS],
- Text:Espacio7[MAX_PLAYERS],
- PlayerBar:Velocidadbar[MAX_PLAYERS],
- PlayerBar:Gasolinabar[MAX_PLAYERS],
- PlayerBar:Estadobar[MAX_PLAYERS],
- TimerVelocidad,
- Gas[MAX_VEHICLES],
- GasBajo,
- Rellenando[MAX_PLAYERS] = 0,
- RellenoTimer[MAX_PLAYERS],
- PlayerBar:MotorBar[MAX_PLAYERS],
- vMotor[MAX_VEHICLES],
- Enciende[MAX_PLAYERS],
- Apagar[MAX_PLAYERS],
- MotorAuto[MAX_VEHICLES];
- forward GasolinaBaja();
- forward TiempoRelleno(playerid);
- new Vehicles[][] =
- {
- "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster",
- "Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto",
- "Taxi","Washington","Bobcat","Mr Whoopee","BF Injection","Hunter","Premier","Enforcer","Securicar","Banshee",
- "Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo",
- "RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer",
- "Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer",
- "PCJ-600","Faggio","Freeway","RC Baron","RC Raider","Glendale","Oceanic","Sanchez","Sparrow","Patriot",
- "Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina","Comet","BMX",
- "Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo",
- "Greenwood","Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa",
- "RC Goblin","Hotring Racer A","Hotring Racer B","Bloodring Banger","Rancher","Super GT","Elegant",
- "Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain","Nebula","Majestic",
- "Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona",
- "FBI Truck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight",
- "Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob",
- "Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A","Monster B","Uranus",
- "Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight",
- "Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford",
- "BF-400","Newsvan","Tug","Trailer A","Emperor","Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C",
- "Andromada","Dodo","RC Cam","Launch","Policia LV","Policia SF","Policia LS)","Police Ranger",
- "Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
- "Stair Trailer","Boxville","Farm Plow","Utility Trailer"
- };
- public OnFilterScriptInit()
- {
- TimerVelocidad = SetTimer("Actualizar", 250, true);
- for(new i=0;i<MAX_VEHICLES;i++)
- {
- Gas[i] = 100;
- }
- Create3DTextLabel("Gasolinería\nUsa /refuel para llenar el tanque de gasolina del auto.", 0xFF8000FF, 2147.3618, 2750.9824, 10.8203, 7.0, 0, 0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(TimerVelocidad);
- KillTimer(GasBajo);
- return 1;
- }
- CMD:refuel(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2147.3618, 2750.9824, 10.8203)) return SendClientMessage(playerid, 0x00FFFFFF, "No estás cerca de la estación de gasolina. Usa /gasolineria para seguir el checkpoint.");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00FF00FF, "No estás en un vehículo.");
- if(Rellenando[playerid]) return SendClientMessage(playerid, 0x00FF00FF, "Ya estás rellenando.");
- if(GetPlayerMoney(playerid) - 80 < 0) return SendClientMessage(playerid, 0x00FFFFFF, "No tienes suficiente dinero.");
- GivePlayerMoney(playerid, -80);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, 0);
- Rellenando[playerid] = 1;
- TextDrawSetString(Gasolina[playerid], "Rellenando...");
- RellenoTimer[playerid] = SetTimerEx("TiempoRelleno", 4500, false, "i", playerid);
- return 1;
- }
- CMD:gasolineria(playerid, params[])
- {
- SendClientMessage(playerid, -1, "Se ha marcado en el mini-mapa el checkpoint ubicado en la gasolinería.");
- SetPlayerCheckpoint(playerid, 2147.3618, 2750.9824, 10.8203, 3.0);
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- forward PlayerVelo(playerid);
- public PlayerVelo(playerid)
- {
- Vehiculo[playerid] = TextDrawCreate(500.000000, 342.000000, "Vehiculo: Vergamovil");
- TextDrawBackgroundColor(Vehiculo[playerid], 255);
- TextDrawFont(Vehiculo[playerid], 1);
- TextDrawLetterSize(Vehiculo[playerid], 0.310000, 1.000000);
- TextDrawColor(Vehiculo[playerid], -1);
- TextDrawSetOutline(Vehiculo[playerid], 0);
- TextDrawSetProportional(Vehiculo[playerid], 1);
- TextDrawSetShadow(Vehiculo[playerid], 1);
- TextDrawUseBox(Vehiculo[playerid], 1);
- TextDrawBoxColor(Vehiculo[playerid], 103);
- TextDrawTextSize(Vehiculo[playerid], 614.000000, 1.000000);
- Velocidad[playerid] = TextDrawCreate(500.000000, 357.000000, "Velocidad: 130 km/h");
- TextDrawBackgroundColor(Velocidad[playerid], 255);
- TextDrawFont(Velocidad[playerid], 1);
- TextDrawLetterSize(Velocidad[playerid], 0.310000, 1.000000);
- TextDrawColor(Velocidad[playerid], -1);
- TextDrawSetOutline(Velocidad[playerid], 0);
- TextDrawSetProportional(Velocidad[playerid], 1);
- TextDrawSetShadow(Velocidad[playerid], 1);
- TextDrawUseBox(Velocidad[playerid], 1);
- TextDrawBoxColor(Velocidad[playerid], 103);
- TextDrawTextSize(Velocidad[playerid], 614.000000, 1.000000);
- Espacio[playerid] = TextDrawCreate(500.000000, 372.000000, " ");
- TextDrawBackgroundColor(Espacio[playerid], 255);
- TextDrawFont(Espacio[playerid], 1);
- TextDrawLetterSize(Espacio[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio[playerid], -1);
- TextDrawSetOutline(Espacio[playerid], 0);
- TextDrawSetProportional(Espacio[playerid], 1);
- TextDrawSetShadow(Espacio[playerid], 1);
- TextDrawUseBox(Espacio[playerid], 1);
- TextDrawBoxColor(Espacio[playerid], 103);
- TextDrawTextSize(Espacio[playerid], 614.000000, 1.000000);
- Espacio2[playerid] = TextDrawCreate(500.000000, 378.000000, " ");
- TextDrawBackgroundColor(Espacio2[playerid], 255);
- TextDrawFont(Espacio2[playerid], 1);
- TextDrawLetterSize(Espacio2[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio2[playerid], -1);
- TextDrawSetOutline(Espacio2[playerid], 0);
- TextDrawSetProportional(Espacio2[playerid], 1);
- TextDrawSetShadow(Espacio2[playerid], 1);
- TextDrawUseBox(Espacio2[playerid], 1);
- TextDrawBoxColor(Espacio2[playerid], 103);
- TextDrawTextSize(Espacio2[playerid], 614.000000, 1.000000);
- Gasolina[playerid] = TextDrawCreate(500.000000, 384.000000, "Gasolina: 100%");
- TextDrawBackgroundColor(Gasolina[playerid], 255);
- TextDrawFont(Gasolina[playerid], 1);
- TextDrawLetterSize(Gasolina[playerid], 0.310000, 1.000000);
- TextDrawColor(Gasolina[playerid], -1);
- TextDrawSetOutline(Gasolina[playerid], 0);
- TextDrawSetProportional(Gasolina[playerid], 1);
- TextDrawSetShadow(Gasolina[playerid], 1);
- TextDrawUseBox(Gasolina[playerid], 1);
- TextDrawBoxColor(Gasolina[playerid], 103);
- TextDrawTextSize(Gasolina[playerid], 614.000000, 1.000000);
- Espacio3[playerid] = TextDrawCreate(500.000000, 399.000000, " ");
- TextDrawBackgroundColor(Espacio3[playerid], 255);
- TextDrawFont(Espacio3[playerid], 1);
- TextDrawLetterSize(Espacio3[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio3[playerid], -1);
- TextDrawSetOutline(Espacio3[playerid], 0);
- TextDrawSetProportional(Espacio3[playerid], 1);
- TextDrawSetShadow(Espacio3[playerid], 1);
- TextDrawUseBox(Espacio3[playerid], 1);
- TextDrawBoxColor(Espacio3[playerid], 103);
- TextDrawTextSize(Espacio3[playerid], 614.000000, 1.000000);
- Espacio4[playerid] = TextDrawCreate(500.000000, 405.000000, " ");
- TextDrawBackgroundColor(Espacio4[playerid], 255);
- TextDrawFont(Espacio4[playerid], 1);
- TextDrawLetterSize(Espacio4[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio4[playerid], -1);
- TextDrawSetOutline(Espacio4[playerid], 0);
- TextDrawSetProportional(Espacio4[playerid], 1);
- TextDrawSetShadow(Espacio4[playerid], 1);
- TextDrawUseBox(Espacio4[playerid], 1);
- TextDrawBoxColor(Espacio4[playerid], 103);
- TextDrawTextSize(Espacio4[playerid], 614.000000, 1.000000);
- Estado[playerid] = TextDrawCreate(500.000000, 411.000000, "Estado: 1000");
- TextDrawBackgroundColor(Estado[playerid], 255);
- TextDrawFont(Estado[playerid], 1);
- TextDrawLetterSize(Estado[playerid], 0.310000, 1.000000);
- TextDrawColor(Estado[playerid], -1);
- TextDrawSetOutline(Estado[playerid], 0);
- TextDrawSetProportional(Estado[playerid], 1);
- TextDrawSetShadow(Estado[playerid], 1);
- TextDrawUseBox(Estado[playerid], 1);
- TextDrawBoxColor(Estado[playerid], 103);
- TextDrawTextSize(Estado[playerid], 614.000000, 1.000000);
- Espacio5[playerid] = TextDrawCreate(500.000000, 426.000000, " ");
- TextDrawBackgroundColor(Espacio5[playerid], 255);
- TextDrawFont(Espacio5[playerid], 1);
- TextDrawLetterSize(Espacio5[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio5[playerid], -1);
- TextDrawSetOutline(Espacio5[playerid], 0);
- TextDrawSetProportional(Espacio5[playerid], 1);
- TextDrawSetShadow(Espacio5[playerid], 1);
- TextDrawUseBox(Espacio5[playerid], 1);
- TextDrawBoxColor(Espacio5[playerid], 103);
- TextDrawTextSize(Espacio5[playerid], 614.000000, 1.000000);
- Espacio6[playerid] = TextDrawCreate(500.000000, 432.000000, " ");
- TextDrawBackgroundColor(Espacio6[playerid], 255);
- TextDrawFont(Espacio6[playerid], 1);
- TextDrawLetterSize(Espacio6[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio6[playerid], -1);
- TextDrawSetOutline(Espacio6[playerid], 0);
- TextDrawSetProportional(Espacio6[playerid], 1);
- TextDrawSetShadow(Espacio6[playerid], 1);
- TextDrawUseBox(Espacio6[playerid], 1);
- TextDrawBoxColor(Espacio6[playerid], 103);
- TextDrawTextSize(Espacio6[playerid], 614.000000, 1.000000);
- Espacio7[playerid] = TextDrawCreate(500.000000, 438.000000, " ");
- TextDrawBackgroundColor(Espacio7[playerid], 255);
- TextDrawFont(Espacio7[playerid], 1);
- TextDrawLetterSize(Espacio7[playerid], 0.310000, 1.000000);
- TextDrawColor(Espacio7[playerid], -1);
- TextDrawSetOutline(Espacio7[playerid], 0);
- TextDrawSetProportional(Espacio7[playerid], 1);
- TextDrawSetShadow(Espacio7[playerid], 1);
- TextDrawUseBox(Espacio7[playerid], 1);
- TextDrawBoxColor(Espacio7[playerid], 103);
- TextDrawTextSize(Espacio7[playerid], 614.000000, 1.000000);
- Velocidadbar[playerid] = CreatePlayerProgressBar(playerid, 504.00, 375.00, 97.50, 3.20, 0x85DFFFFF, 100.0);
- Gasolinabar[playerid] = CreatePlayerProgressBar(playerid, 504.00, 401.00, 98.50, 3.20, 0xD2FF9DFF, 100.0);
- Estadobar[playerid] = CreatePlayerProgressBar(playerid, 504.00, 429.00, 98.50, 3.20, 0x9EEBCFFF, 100.0);
- MotorBar[playerid] = CreatePlayerProgressBar(playerid, 287.00, 197.00, 55.50, 3.20, 0xFFFFFFFF, 100.0);
- return 1;
- }
- forward BorrarPlayerVelo(playerid);
- public BorrarPlayerVelo(playerid)
- {
- TextDrawHideForPlayer(playerid, Vehiculo[playerid]);
- TextDrawHideForPlayer(playerid, Velocidad[playerid]);
- TextDrawHideForPlayer(playerid, Espacio[playerid]);
- TextDrawHideForPlayer(playerid, Espacio2[playerid]);
- TextDrawHideForPlayer(playerid, Gasolina[playerid]);
- TextDrawHideForPlayer(playerid, Espacio3[playerid]);
- TextDrawHideForPlayer(playerid, Espacio4[playerid]);
- TextDrawHideForPlayer(playerid, Estado[playerid]);
- TextDrawHideForPlayer(playerid, Espacio5[playerid]);
- TextDrawHideForPlayer(playerid, Espacio6[playerid]);
- TextDrawHideForPlayer(playerid, Espacio7[playerid]);
- HidePlayerProgressBar(playerid, Velocidadbar[playerid]);
- HidePlayerProgressBar(playerid, Estadobar[playerid]);
- HidePlayerProgressBar(playerid, Gasolinabar[playerid]);
- return 1;
- }
- public GasolinaBaja()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(Rellenando[i]) continue;
- new vehicleid = GetPlayerVehicleID(i);
- Gas[vehicleid] = Gas[vehicleid] -1;
- if(GetPlayerVehicleSeat(i) == 0)
- {
- if(Gas[vehicleid] < 1)
- {
- Gas[vehicleid] = 0;
- RemovePlayerFromVehicle(i);
- GameTextForPlayer(i,"~r~Estás sin ~w~gasolina~r~.",5000,4);
- }
- }
- }
- return 1;
- }
- public TiempoRelleno(playerid)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- Gas[vehicleid] = Gas[vehicleid] = 100;
- Rellenando[playerid] = 0;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- TogglePlayerControllable(i, 1);
- }
- TextDrawSetString(Gasolina[playerid], "~r~~h~Gasolina: ~w~100 Litros");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- MotorAuto[vehicleid] = 0;
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(MotorAuto[vehicleid] == 1)
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0x808000FF, "El motor del auto está encedido, para apagarlo haz click.");
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return CallLocalFunction("PlayerVelo", "d", playerid), 1;
- }
- forward Actualizar();
- public Actualizar()
- {
- new
- i = GetMaxPlayers()-1,
- szString[4][48],
- Float:EstadoV,
- vehicleid,
- VelocidadVeh;
- while(--i > -1)
- {
- if(!IsPlayerInAnyVehicle(i)) continue;
- else {
- vehicleid = GetPlayerVehicleID(i);
- GetVehicleHealth(vehicleid, EstadoV);
- VelocidadVeh = GetSpeed(i);
- format(szString[1], 48,"~b~~h~Vehiculo: ~w~%s",Vehicles[GetVehicleModel(vehicleid)-400]);
- format(szString[0], 48,"~g~~h~Velocidad: ~w~%d Km/h", VelocidadVeh);
- format(szString[2], 48,"~y~~h~Estado: ~w~%0.0f%%",EstadoV/10);
- format(szString[3], 48,"~r~~h~Gasolina: ~w~%i Litros",Gas[vehicleid]);
- //======================================================================================//
- TextDrawSetString(Vehiculo[i], szString[1]), TextDrawSetString(Velocidad[i], szString[0]);
- TextDrawSetString(Estado[i], szString[2]), TextDrawSetString(Gasolina[i], szString[3]);
- TextDrawShowForPlayer(i, Vehiculo[i]), TextDrawShowForPlayer(i, Velocidad[i]),
- TextDrawShowForPlayer(i, Espacio[i]), TextDrawShowForPlayer(i, Espacio2[i]),
- TextDrawShowForPlayer(i, Gasolina[i]), TextDrawShowForPlayer(i, Espacio3[i]),
- TextDrawShowForPlayer(i, Espacio4[i]), TextDrawShowForPlayer(i, Estado[i]),
- TextDrawShowForPlayer(i, Espacio5[i]), TextDrawShowForPlayer(i, Espacio6[i]),
- TextDrawShowForPlayer(i, Espacio7[i]);
- //=========================================================//
- SetPlayerProgressBarMaxValue(i, Velocidadbar[i], 300.0);
- SetPlayerProgressBarValue(i, Velocidadbar[i], VelocidadVeh);
- UpdatePlayerProgressBar(i, Velocidadbar[i]);
- //=========================================================//
- SetPlayerProgressBarMaxValue(i, Estadobar[i], 100);
- SetPlayerProgressBarValue(i, Estadobar[i], EstadoV/10);
- UpdatePlayerProgressBar(i, Estadobar[i]);
- //=========================================================//
- SetPlayerProgressBarMaxValue(i, Gasolinabar[i], 100);
- SetPlayerProgressBarValue(i, Gasolinabar[i], Gas[vehicleid]);
- UpdatePlayerProgressBar(i, Gasolinabar[i]);
- }
- }
- return 1;
- }
- stock GetSpeed(playerid, mode = 1)
- {
- new Float:Velocidade [3];
- GetVehicleVelocity(GetPlayerVehicleID(playerid),Velocidade[0],Velocidade[1],Velocidade [2]);
- return IsPlayerInAnyVehicle(playerid)?floatround(((floatsqroot(((Velocidade[0]*Velocidade[0])+(Velocidade[1]*Velocidade[1])+(Velocidade[2]*Velocidade[2])))*(!mode?105.0:170.0)))*1):0;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- if(MotorAuto[playerid] == 0)
- {
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, 0xFF0080FF, "El motor del auto está apagado, manten pulsado el click para encenderlo.");
- }
- Actualizar();
- ShowPlayerProgressBar(playerid, Velocidadbar[playerid]);
- ShowPlayerProgressBar(playerid, Gasolinabar[playerid]);
- ShowPlayerProgressBar(playerid, Estadobar[playerid]);
- }
- else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
- {
- BorrarPlayerVelo(playerid);
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new vehid = GetPlayerVehicleID(playerid);
- if(HOLDING(KEY_FIRE))
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(MotorAuto[vehid] == 0)
- {
- GameTextForPlayer(playerid, "~r~Encendiendo...",4000,3);
- Enciende[playerid] = SetTimerEx("Prende", 1000, 1, "d", playerid);
- }
- else
- {
- Apagar[playerid] = SetTimerEx("Apaga", 1500, false, "d", playerid);
- GameTextForPlayer(playerid, "~b~Apagando...", 1000, 3);
- }
- }
- }
- else if(RELEASED(KEY_FIRE))
- {
- new vid = GetPlayerVehicleID(playerid);
- if(MotorAuto[vid] == 0)
- {
- SetPlayerProgressBarValue(playerid, MotorBar[playerid], 0);
- vMotor[vid] =(0);
- UpdatePlayerProgressBar(playerid, MotorBar[playerid]);
- KillTimer(Enciende[playerid]);
- }
- }
- return 1;
- }
- forward Apaga(playerid);
- public Apaga(playerid)
- {
- new vid = GetPlayerVehicleID(playerid);
- new enginem, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(GetPlayerVehicleID(playerid),enginem, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
- GameTextForPlayer(playerid, "~w~Motor ~r~Apagado", 1000, 3);
- MotorAuto[vid] = 0;
- return 1;
- }
- forward Prende(playerid);
- public Prende(playerid)
- {
- new i = playerid;
- if(IsPlayerInAnyVehicle(i))
- {
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(i);
- vMotor[vehicleid] += (25);
- ShowPlayerProgressBar(i, MotorBar[i]);
- SetPlayerProgressBarValue(i, MotorBar[i], vMotor[vehicleid]);
- UpdatePlayerProgressBar(i, MotorBar[i]);
- if(vMotor[vehicleid] >= 100)
- {
- GasBajo = SetTimer("GasolinaBaja", 4200 ,true);
- new vid = GetPlayerVehicleID(playerid);
- new enginem, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(GetPlayerVehicleID(playerid),enginem, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
- GameTextForPlayer(playerid, "~r~Motor ~y~Encendido", 1000, 3);
- MotorAuto[vid] = 1;
- vMotor[vehicleid] =(0);
- HidePlayerProgressBar(playerid, MotorBar[playerid]);
- SetPlayerProgressBarValue(i, MotorBar[playerid], 0);
- TogglePlayerControllable(playerid, 1);
- KillTimer(Enciende[playerid]);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement