04.08.2011, 20:13
Well i'm getting some errors.
Code:
(16675) : error 035: argument type mismatch (argument 2) (16676) : error 033: array must be indexed (variable "EngineStatus") (16680) : error 033: array must be indexed (variable "EngineStatus")
pawn Code:
166669 - public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
166670 {
166671 if(newkeys & KEY_ACTION && !(newkeys & KEY_ACTION))
166672 {
166673 new lights, alarm, doors, bonnet, boot, objective;
166674 new vid = GetPlayerVehicleID(playerid);
166675 GetVehicleParamsEx(vid,EngineStatus,lights,alarm,doors,bonnet,boot,objective);
166676 if(vid != INVALID_VEHICLE_ID && EngineStatus== 0)
166677 {
166678 SetVehicleParamsEx(vid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective); //engine started
166680 }
166681 else if(vid != INVALID_VEHICLE_ID && EngineStatus== 1)
166682 {
166683 SetVehicleParamsEx(vid, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, 166684 objective); //engine stopped
166685 }
166686 }
166687 return 1;
166688 }