Car help, engine & Car exploding, vanishes the paintjob
#1

delethis
Reply
#2

You should save your engine status in player information (.ini or in mysql , depend of how you save your player characters)

to make sure when you spown a new vehicle in game , add those two lines where the cmd of adding a vehicle
Код:
engine = 0;
SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
rep + if i helped you
Reply
#3

---------------
Reply
#4

No.. You save it in a Variable, and change it according to whether you want it On or Off.

Example:
pawn Код:
new Engine[MAX_PLAYERS];

if(Engine[vehicleid] == 1)
pawn Код:
Engine on:

new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);


Engine off:

new engine, lights, alarm, doors, bonnet, boot, objective;
 GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
Reply
#5

pawn Код:
public OnVehicleSpawn(vehicleid)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
 GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
    YourEngineVariable[vehicleid] = 0;
    return 1;
}
Reply
#6

---------------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)