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: 4301 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(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)
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: 27
Na forum: 4156 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

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: 4488 dni
Posty: 343
Nick w MP: CrosRoad95

Piwa: 3887

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: 4301 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: 27
Na forum: 4912 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: 4301 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: 27
Na forum: 4912 dni
Posty: 1438

Piwa: 2512

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

Ostrzeżeń: 60%
function add(thePlayer, seat, jacked )
    if ( getElementModel ( source ) == id_pojazdu ) then
        addVehicleSirens(source, 6, 2, false, true, true, false) 
setVehicleSirens(source, 1, 0.6, 4.3, 0, 255, 0, 0, 255, 255) 
setVehicleSirens(source, 2, -0.7, 4.3, 0, 0, 117.3, 255, 255, 255) 
setVehicleSirens(source, 3, 0.6, -3.5, 1.6, 0, 117.3, 255, 255, 255) 
setVehicleSirens(source, 4, -0.7, -3.2, 1.6, 255, 0, 0, 191.3, 191.3) 
setVehicleSirens(source, 5, -1.4, 0.6, -0.1, 0, 117.3, 255, 255, 255) 
setVehicleSirens(source, 6, 1.6, 0.6, -0.1, 255, 0, 0, 191.3, 191.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 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