Jump to content

[REZOLVAT] GAS NRG/FCR.


MasterAdv
 Share

Recommended Posts

Scriptul este facut ca pentru biciclete sa creasca fuel-ul.

Scoate NRG-ul si FCR-ul din functia IsABike() si cand jucatorul foloseste comanda /puthelmet, atunci cand ii verifica vehiculul verifica si daca este NRG sau FCR.

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

  • Administrator
function IsABike2(vehicleid) {
	switch (GetVehicleModel(vehicleid)) {
		case 448, 461, 462, 463, 468, 471, 481, 509, 510, 521, 523, 568, 571, 581, 586: return 1;
	}
	return 0;
}
function CheckGas() 
{
	new engine, lights, alarm, doors, bonnet, boot, objective;

	foreach(new i : Player)
	{
   	    if(GetPlayerState(i) == PLAYER_STATE_DRIVER) 
   	    {
       		new vehicle = GetPlayerVehicleID(i), query[128];

			if(Gas[vehicle] >= 1) 
			{
	   		    if(vehEngine[vehicle] == 1) 
	   		    {
					if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike2(vehicle) || ExamCar[i] == vehicle || JobVehicle[i] == vehicle) { Gas[vehicle]++; }

	              	if(!IsPlayerPaused(i)) Gas[vehicle]--;

	              	new carid = FindSpawnID(vehicle);

		            if(CarInfo[carid][cID] != -2 && carid != 0) 
		            {
                        new spe = Carspeed(i);

						if(spe > 5 && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == vehicle && !IsPlayerPaused(i)) 
						{
							CarInfo[carid][KM] += (spe * 0.27) / 100;

							mysql_format(SQL, query, sizeof query, "UPDATE `server_players_cars` SET `KM` = '%f' WHERE `ID` = '%d'", CarInfo[carid][KM], carid);
							mysql_tquery(SQL, query, "", "");
						}
					}
				}
	   		}

   			else if(!IsAFLYCar(vehicle)) 
   			{
              	NoFuel[i] = 1;

              	TogglePlayerControllable(i, 0);

	        	GameTextForPlayer(i, "Fara benzina", 1500, 3);

	        	vehEngine[vehicle] = 0;

    			GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
      	    	SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);

      	    	SetPVarInt(i, "Engine", 0);
			}
		}
	}
	return 1;
}

Il updatezi si tu pt gm ul tau.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...