Engine -
izeatfishz - 01.02.2016
Got a problem where when lspd vehicles respawn they respawn with a broken engine state, so if i try /engine nothing happens:
Onvehspawn:
Код:
/*if(IsLSPDCar(vehicleid))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(LSPDCar[(vehicleid)], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(LSPDCar[(vehicleid)], 0, lights, alarm, doors, bonnet, boot, objective);
SetVehicleNumberPlate(LSPDCar[(vehicleid)], "LSPD");
SetVehicleHealth(LSPDCar[vehicleid], 1250);
}*/
Код:
if(vehicleid == Vehicle[playerid] || IsLSPDCar(vehicleid) && PlayerInfo[playerid][Faction] == 1 || IsLSFDCar(vehicleid) && PlayerInfo[playerid][Faction] == 2 || IsTrashVan(vehicleid) && PlayerInfo[playerid][Job] == 3 || IsPizzaBike(vehicleid) && PlayerInfo[playerid][Job] == 4)
{
if(vehicleid == Vehicle[playerid] && VehicleInfo[playerid][Fuel] <= 0) return SCM(playerid, COLOR_GENERIC_WARNING, "Your vehicle has no fuel in it, refuel it with a gas can or at a fuel station.");
if(engine == VEHICLE_PARAMS_OFF)
{
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
format(string, sizeof(string), "* %s turns the %s's engine on.", PlayerName(playerid),GetVehicleName(vehicleid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
PlayerPlaySound(playerid, 21002, 0.0, 0.0, 0.0);
}
else if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
GameTextForPlayer(playerid, "~r~Engine off!", 2000, 4);
format(string, sizeof(string), "* %s turns the %s's engine off.", PlayerName(playerid),GetVehicleName(vehicleid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
}
so stuck on a solution here, help!
Re: Engine -
Hellman92 - 01.02.2016
try this
PHP код:
if(IsLSPDCar(vehicleid))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(LSPDCar[(vehicleid)], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(LSPDCar[(vehicleid)], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleNumberPlate(LSPDCar[(vehicleid)], "LSPD");
}
Re: Engine -
IzadorO - 01.02.2016
if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
Re: Engine -
izeatfishz - 02.02.2016
dont seem to be working