Something is wrong with bind
#1

Код:
if (newkeys==KEY_CROUCH)
	{
        new engine,lights,alarm,doors,bonnet,boot,objective;
    	GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
		if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
		{
			if(lights != 1)
   			{
      			lights = 1;
         		SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
           		SendClientMessage(playerid, 0xFFFFFFAA, "You've turned the vehicle's lights on!");
               	return 1;
           	}
            else
            {
            	lights = 0;
             	SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
              	SendClientMessage(playerid, 0xFFFFFFAA, "You've turned the vehicle's lights off!");
                return 1;
      		}
		}
		return lights;
	}
i just made this but i don't know why is dosen't work
Reply
#2

Your KEY_CROUCH is vehicle horn in vehicle state.
Reply
#3

ohh i put KEY_FIRE but still don't work, i get the message "You've turned the vehicle's lights on!" but the lights are off
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)