Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-06-06, 21:31


Fokus1980







Wiek: 46
Na forum: 4918 dni
Posty: 4
Nick w MP: Fokus



Respekt: 50

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
end
end
bindKey( 'b', 'down', bindHoron )
bindKey( 'b', 'up', bindHoron )




Witam mam tutaj taki skrypt ?e jak klika si? klawisz b to z auta s?ycha? odg?os syren chce ustawi? tak by wybrane auta modelu 596 by mo?na by?o tylko w tym poje?dzie po klikni?ciu klawisza b oddawa? g?os 3d a inne samochody nie jak mam si? do tego zabra? m?g? by kto? szczeg??owo to opisa? dam piwko jestem Zielony w Lua prosz? o szczeg??ow? pomoc Dzi?kuje.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-06, 22:31


Riot

3X






Wiek: 30
Na forum: 5870 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

function bindHoron( key, keyState ) 
if ( keyState == 'down' ) then 
if isPedInVehicle( localPlayer ) then 
local x, y, z = getElementPosition(localPlayer)
local veh = getPedOccupiedVehicle(localPlayer)
if getElementModel(veh) == 596 then
sound = playSound3D( 'horn.mp3', x, y, z) 
setSoundVolume(sound,5.0) 
setSoundMaxDistance(sound, 190) 
attachElements( sound, getPedOccupiedVehicle( localPlayer ) ) 
elseif ( keyState == 'up' ) then 
if isElement( sound ) then 
stopSound( sound ) 
end 
end 
end
end 
end 
bindKey( 'b', 'down', bindHoron ) 
bindKey( 'b', 'up', bindHoron ) 


Postaw piwo autorowi tego posta
 

 
Tagi: skrypt :: vehicle
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku