Quote:
Originally Posted by Threshold
Vehicles are on by default. As long as you aren't using SetVehicleParamsEx under OnPlayerStateChange or OnPlayerEnterVehicle, you shouldn't have a problem with the engine being disabled.
pawn Код:
CMD:lights(playerid, params[]) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "Error: You are not in the drivers seat of any vehicle."); new vehicleid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, engine, (lights) ? (0) : (1), alarm, doors, bonnet, boot, objective); return 1; }
|
thanks for your effort in helping me thres but with your code the lights come on for about 2 seconds then comes back off and when i'm on foot :S
i checked back the two callbacks u mentioned and i don't have SetVehicleParamsEx or anything of that sort under them /:
and i find it weird cause the /engine command works and its formatted the same as the lights command ._.