SetVehicleParamsEx problems
#1

Код:
	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
		        {
		        }
	        }
	    }
	}
when y press Y , i can start/stop engine from inside the car so it work fine.
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.
Reply


Messages In This Thread
SetVehicleParamsEx problems - by TheAngryBird - 20.05.2017, 04:44
Re: SetVehicleParamsEx problems - by DobbysGamertag - 20.05.2017, 05:49
Re: SetVehicleParamsEx problems - by StrikerZ - 20.05.2017, 06:02
Re: SetVehicleParamsEx problems - by TheAngryBird - 20.05.2017, 06:12
Re: SetVehicleParamsEx problems - by StrikerZ - 20.05.2017, 06:28
Re: SetVehicleParamsEx problems - by TheAngryBird - 20.05.2017, 06:31
Re: SetVehicleParamsEx problems - by StrikerZ - 20.05.2017, 06:33
Re: SetVehicleParamsEx problems - by TheAngryBird - 20.05.2017, 06:38
Re: SetVehicleParamsEx problems - by StrikerZ - 20.05.2017, 06:43
Re: SetVehicleParamsEx problems - by Vince - 20.05.2017, 07:34

Forum Jump:


Users browsing this thread: 5 Guest(s)