lock vehicle
#1

Код:
else if(CheckPlayerDistanceToVehicle(5.0, playerid, masinaInchiriata[playerid] == 0))
			{
				new carid = masinaInchiriata[playerid];
				if(gCarLock[carid] == 0)
				{
					new vehicles = GetVehicleModel(carid) - 400;
					format(string, sizeof(string), "~h~%s~n~~r~Locked", aVehicleNames[vehicles]);
					GameTextForPlayer(playerid, string, 5000, 3);
					PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
					gCarLock[carid] = 1;
					GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
					SetVehicleParamsEx(carid, engine, lights, alarm, 1, bonnet, boot, objective);
					return 1;
				}
				else if(masinaInchiriata[playerid] == 1)
				{
					new vehicles = GetVehicleModel(carid) - 400;
					format(string, sizeof(string), "~h~%s~n~~g~Unlocked", aVehicleNames[vehicles]);
				    GameTextForPlayer(playerid, string, 5000, 3);
					PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
					gCarLock[carid] = 0;
	    			GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
	      	    	SetVehicleParamsEx(carid,engine,lights,alarm,0,bonnet,boot,objective);
		            return 1;
				}
			}
this is for KEY_NO, why the car is not locking / unlocking?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)