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

Wysłany: 2015-07-19, 17:57


sebik2303

Mapper :)






Wiek: 25
Na forum: 4160 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

Witam, mam problem. Zrobi?em sobie syreny w edytorze. Chc? teraz Kod zamie?ci? w skrypcie i nada? komend?.
Oto kod


removeVehicleSirens(veh)
addVehicleSirens(veh62falsetruetruefalse)
setVehicleSirens(veh10.64.3025500255255)
setVehicleSirens(veh2, -0.74.300117.3255255255)
setVehicleSirens(veh30.6, -3.51.60117.3255255255)
setVehicleSirens(veh4, -0.7, -3.21.625500191.3191.3)
setVehicleSirens(veh5, -1.40.6, -0.10117.3255255255)
setVehicleSirens(veh61.60.6, -0.125500191.3191.3)
addCommandHandler("syg"veh)


oraz mam db

to jest jak mam ca?y kod :

removeVehicleSirens(veh)

To jak usune 1 linijk?



Prosz? o pomoc :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-19, 21:47


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

Nie masz zdefiniowanego veh. Skrypt nie wie co to oznacza.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-20, 13:58


PolskiSebek12

Programista






Wiek: 28
Na forum: 4346 dni
Posty: 343
Nick w MP: CrosRoad95

Piwa: 3883

Respekt: 288,8
Respekt: 288,8Respekt: 288,8Respekt: 288,8

Ostrzeżeń: 100%
unction syrena(veh,cmd,a)
veh = getPedOccupiedVehicle(veh)
if veh and a == "wlacz" then
addVehicleSirens(veh, 6, 2, false, true, true, false)
setVehicleSirens(veh, 1, 0.6, 4.3, 0, 255, 0, 0, 255, 255)
setVehicleSirens(veh, 2, -0.7, 4.3, 0, 0, 117.3, 255, 255, 255)
setVehicleSirens(veh, 3, 0.6, -3.5, 1.6, 0, 117.3, 255, 255, 255)
setVehicleSirens(veh, 4, -0.7, -3.2, 1.6, 255, 0, 0, 191.3, 191.3)
setVehicleSirens(veh, 5, -1.4, 0.6, -0.1, 0, 117.3, 255, 255, 255)
setVehicleSirens(veh, 6, 1.6, 0.6, -0.1, 255, 0, 0, 191.3, 191.3)
elseif veh and a == "wylacz" then
removeVehicleSirens(veh)
end
end
addCommandHandler("syreny", veh)

wchodzisz do pojazdu i wpisujesz /syreny wlacz - w??cza syreny
a /syreny wylacz - wy??cza syreny

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-21, 12:34


sebik2303

Mapper :)






Wiek: 25
Na forum: 4160 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

PolskiSebek12, nie dzia?a :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-21, 15:52


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
"sebik2303" napisał/a:

PolskiSebek12, nie dzia?a :/


Rozumiem, ze ty chcesz aby syreny sie wlaczaly na komend?, tak ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-21, 16:24


sebik2303

Mapper :)






Wiek: 25
Na forum: 4160 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

DestroY, albo komend? lub aby wpisa? komend? i si? przypisywa?o do pojazdu, p??niej tylko klaksonem w??cza?o :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-21, 23:53


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
function add(thePlayerseatjacked )
    if ( getElementModel source ) == id_pojazdu then
        addVehicleSirens(source62falsetruetruefalsesetVehicleSirens(source10.64.3025500255255setVehicleSirens(source2, -0.74.300117.3255255255setVehicleSirens(source30.6, -3.51.60117.3255255255setVehicleSirens(source4, -0.7, -3.21.625500191.3191.3setVehicleSirens(source5, -1.40.6, -0.10117.3255255255setVehicleSirens(source61.60.6, -0.125500191.3191.3)    end
end
addEventHandler "onVehicleEnter"getRootElement(), add)



Pozniej juz tylko wlaczasz tradycyjnie klaksonem ;)

Postaw piwo autorowi tego posta
 

 
Tagi: syreny
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » syreny 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