20.05.2017, 04:44
Код:
if((newkeys & KEY_YES) && !(oldkeys & KEY_YES)) { new NearestVehicleID = GetClosestVehicle(playerid); if(!PlayerToVehicle(playerid, NearestVehicleID, 3.0)) NearestVehicleID = 0; new Float:NearestVehiclePosX, Float:NearestVehiclePosY, Float:NearestVehiclePosZ; GetVehiclePos(NearestVehicleID, NearestVehiclePosX, NearestVehiclePosY, NearestVehiclePosZ); new playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid,playerName,sizeof playerName); if(IsPlayerInAnyVehicle(playerid)) { Dialog_Show(playerid, DIALOG_VEHICLEMENU, DIALOG_STYLE_LIST, "Vehicle", "Engine\nLight\nHood\nBoot\nDoors\nWindows\nPark", "Ok", "Cancel"); } else { if(IsPlayerInRangeOfPoint(playerid, 3.0, NearestVehiclePosX, NearestVehiclePosY, NearestVehiclePosZ)) { if(IsVehiclePrivate(NearestVehicleID)) { if(!strcmp(playerName,PrivateVehicles[ConvertVID(NearestVehicleID)][_owner])) return 0; new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(NearestVehicleID, engine, lights, alarm, doors, bonnet, boot, objective); if(doors == VEHICLE_PARAMS_OFF) { SetVehicleParamsEx(NearestVehicleID, engine, lights, alarm, VEHICLE_PARAMS_ON, bonnet, boot, objective); SendClientMessage(playerid, -1, "your vehicle is now locked"); } if(doors == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(NearestVehicleID, engine, lights, alarm, VEHICLE_PARAMS_OFF, bonnet, boot, objective); SendClientMessage(playerid, -1, "your vehicle is now unlocked"); } } else { } } } }
but door wont lock/unlock ? ( from outside )
i know its just the door lock part that isnt working because if i add a message right before if(doors == VEHICLE_PARAMS_OFF) i reveive the message.
same if i do a command. im playing with this bug since 2 days and cant find anything.
tried different includes , different codes... no luck.
PS if i add a message that give the nearest vehicle id , then i get the right id. this is not the problem.