11.01.2011, 13:29
This would be enough:
pawn Код:
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, COLOR_RED, "[ERROR] You cannot use this command while you are not the driver of a vehicle!");
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
if(lights != 1) SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, 1, alarm, doors, bonnet, boot, objective);
else SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, 0, alarm, doors, bonnet, boot, objective);