SA-MP Forums Archive
Something is wrong with bind - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Something is wrong with bind (/showthread.php?tid=277450)



Something is wrong with bind - qUick1337 - 18.08.2011

Код:
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


Re: Something is wrong with bind - =WoR=Varth - 18.08.2011

Your KEY_CROUCH is vehicle horn in vehicle state.


Re: Something is wrong with bind - qUick1337 - 18.08.2011

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