0 Üye ve 1 Ziyaretçi konuyu incelemekte.
function fonksyion() if getKeyState( "lctrl" ) == true then endendbindKey( "n", "down", fonksyion)
Kodfunction fonksyion() if getKeyState( "lctrl" ) == true then endendbindKey( "n", "down", fonksyion)Mesaj Birleştirildi: 04 Haziran 2020, 13:34:07Alta basılı tutup n ye bastığında gerçekleşecek if 'in altına Alta basılı tutup n ye bastığında gerçekleşecek işlevleri girebilirsin.
local bindimiz = "C"bindKey (bindimiz, "both", function ()outputChatBox(bindimiz.."tuşuna basıyosun")end)
Oyuncunun bir tuşa basılı tuttuğunda ses çalmasını istiyorum bunu nasıl yaparım?
function bindHoron( key, keyState ) if isPedInVehicle( localPlayer ) then if ( keyState == 'down' ) then sound = playSound3D( 'horn.mp3', getElementPosition( localPlayer ) ) setSoundVolume(desusound,5.0) setSoundMaxDistance(desusound, 190) attachElements( sound, getPedOccupiedVehicle( localPlayer ) ) elseif ( keyState == 'up' ) then if isElement( sound ) then stopSound( sound ) end end endendbindKey( 'w', 'down', bindHoron )bindKey( 'w', 'up', bindHoron )