[YARDIM] Araca Özel İD

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı cakı11

  • Yeni Üye
  • *
    • İleti: 79
: 12 Nisan 2018, 16:35:23
Beyler bu korna kodu benım belırledıgım araclara özel yapmak istiyorum yardımcı olurmsunuz.

Kod: lua
function bindHoron( key, keyState )
    if isPedInVehicle( localPlayer ) then
      --if seat == 0 then
        if ( keyState == 'down' ) then
            sound = playSound3D( 'horn.mp3', getElementPosition( localPlayer ) )
            setSoundVolume(desusound,5.0)
            setSoundMaxDistance(desusound, 200)
            attachElements( sound, getPedOccupiedVehicle( localPlayer ) )
        elseif ( keyState == 'up' ) then
            if isElement( sound ) then
                stopSound( sound )
            end
        end
    end
end
bindKey( 'h', 'down', bindHoron )
bindKey( 'capslock', 'down', bindHoron )
bindKey( 'h', 'up', bindHoron )
bindKey( 'capslock', 'up', bindHoron )
« Son Düzenleme: 13 Nisan 2018, 21:07:44 Gönderen: Narkoz »
 


MTASATURK

[YARDIM] Araca Özel İD
« : 12 Nisan 2018, 16:35:23 »

Çevrimdışı ByCash

  • Admin
  • *
    • İleti: 986
Yanıtla #1 : 12 Nisan 2018, 16:55:20
Kod: lua
araclar = {411, 413, 600, 601,} --[[Arac idlerini belirliyebileceğiniz kısım.]]

function bindHoron(key, keyState)
for i, v in ipairs(araclar) do
 if getElementModel(localPlayer) == v then
    if isPedInVehicle( localPlayer ) then
      --if seat == 0 then
        if ( keyState == 'down' ) then
            sound = playSound3D( 'horn.mp3', getElementPosition( localPlayer ) )
            setSoundVolume(desusound,5.0)
            setSoundMaxDistance(desusound, 200)
            attachElements( sound, getPedOccupiedVehicle( localPlayer ) )
        elseif ( keyState == 'up' ) then
            if isElement( sound ) then
                stopSound( sound )
            end
        end
    end
end
end
end
bindKey( 'h', 'down', bindHoron )
bindKey( 'capslock', 'down', bindHoron )
bindKey( 'h', 'up', bindHoron )
bindKey( 'capslock', 'up', bindHoron )
« Son Düzenleme: 12 Nisan 2018, 16:59:17 Gönderen: ByCash »
 


Çevrimdışı cakı11

  • Yeni Üye
  • *
    • İleti: 79
Yanıtla #2 : 12 Nisan 2018, 17:00:58
eyvalh adamsın konu kıtlene bilir!!
 


Çevrimdışı ByCash

  • Admin
  • *
    • İleti: 986
Yanıtla #3 : 12 Nisan 2018, 17:02:00
Rica ederim.

İsteğiniz üzerine konunuz kilitlenmiştir.
« Son Düzenleme: 12 Nisan 2018, 17:11:21 Gönderen: ByCash »