26.01.2013, 09:11
Quote:
This works: Tested fully.
pawn Код:
|
![Sad](images/smilies/sad.gif)
I think i made it a type off work. But there is another issue . I converted the code into this :
pawn Код:
if (AVehicleData[vehicleid][Fuel] > 0)
{
if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION) && IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(engine == 0 || lights == 0)
{
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, COLOR_PINK, "[CAR] Engine Started!");
}
if(engine == 1 || lights == 1)
{
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, COLOR_PINK, "[CAR] Engine stopped!");
}
}
}
}