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

Wysłany: 2017-06-21, 16:45


switel1200

Uczeń LUA






Wiek: 25
Na forum: 3409 dni
Posty: 37
Nick w MP: Switel12

Piwa: 7

Respekt: 55,3

Witam zrobi?em skrypt na syreny przy pomocy sireneditor pod Police SF i chce ?eby to by?o na ka?dy pojazd o danym ID.
oto skrypt:


function syrena()
if id == 597
removeVehicleSirens(veh)
setVehicleSirens veh10.500, -0.4000.9005660255255 )
addVehicleSirens veh12falsefalsefalsetrue setVehicleSirens veh2, -0.500, -0.4000.9005660255255 )
addVehicleSirens veh22falsefalsefalsetrue setVehicleSirens veh30.3002.5000.0005660255255 )
addVehicleSirens veh32falsefalsefalsetrue setVehicleSirens veh4, -0.3002.5000.0005660255255 )
addVehicleSirens veh42falsefalsefalsetrue setVehicleSirens veh50.800, -2.7000.0005660255255 )
addVehicleSirens veh52falsefalsefalsetrue setVehicleSirens veh6, -0.800, -2.7000.0005660255255 )
addVehicleSirens veh62falsefalsefalsetrue )
end
bindKey("h""down"syrena)


PS: Jak co? zle zrobi?em to prosze napisa? zielony w lua jestem.

Ostatnio zmieniony przez Dexnes_ 2017-06-21, 16:47, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 2 piw(a):
RoleX102938, pawelloo
Wysłany: 2017-06-21, 16:47


Makay

Tryb .lua






Wiek: 26
Na forum: 3288 dni
Posty: 38
Nick w MP: Makay

Piwa: 774

Respekt: 40,5

Ostrzeżeń: 100%
Zobacz to:
function syrena() 
if pojazd and getVehicleController(pojazd)==localPlayer then
local id =getElementModel(pojazd)
if id == 597 
removeVehicleSirens(vehsetVehicleSirens veh10.500, -0.4000.9005660255255 addVehicleSirens veh12falsefalsefalsetrue setVehicleSirens veh2, -0.500, -0.4000.9005660255255 addVehicleSirens veh22falsefalsefalsetrue setVehicleSirens veh30.3002.5000.0005660255255 addVehicleSirens veh32falsefalsefalsetrue setVehicleSirens veh4, -0.3002.5000.0005660255255 addVehicleSirens veh42falsefalsefalsetrue setVehicleSirens veh50.800, -2.7000.0005660255255 addVehicleSirens veh52falsefalsefalsetrue setVehicleSirens veh6, -0.800, -2.7000.0005660255255 addVehicleSirens veh62falsefalsefalsetrue end 
bindKey("h""down"syrena)


Podpis
Początkowy Programista LUA

[lua]if getElementData(source, "gracz:Makay") then
setPlayerName(source, "Makauś")
else
setPlayerName(source, ".lua")
end[/lua]
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
switel1200
Wysłany: 2017-06-21, 16:48


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

yyy nie jest to podpi?te pod event, nie sprawdzasz czy kto? jest w poje?dzie wgl. nie ma tutaj nic co pozwoli?oby ?eby to dzia?a?o. Daj to pod event wsiadania do pojazdu. Tam daj w argumenty pojazd i gracza.

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 16:50


switel1200

Uczeń LUA






Wiek: 25
Na forum: 3409 dni
Posty: 37
Nick w MP: Switel12

Piwa: 7

Respekt: 55,3

A ?eby zmieni? kolor to po X, Y, Z tam jest 5 to to zmieni??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 16:59


PapaSmerf







Wiek: 25
Na forum: 3526 dni
Posty: 237

Piwa: 3857

Respekt: 64

0, 255, 255 <- to jest kolor i to zmieniasz
R = 0
G = 255
B = 255

tu masz liste kolor?w
https://pl.wikipedia.org/wiki/Lista_kolor%C3%B3w

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
switel1200
Wysłany: 2017-06-21, 18:13


switel1200

Uczeń LUA






Wiek: 25
Na forum: 3409 dni
Posty: 37
Nick w MP: Switel12

Piwa: 7

Respekt: 55,3

Mam jeszcze jeden problem ze skryptem ot?? to, ?e jak w??czam mta i serwer lokalny i szykam sygnaly to nie ma co mam robi?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 18:21


neku^







Wiek: 24
Na forum: 3522 dni
Posty: 461
Nick w MP: neku^

Piwa: 1186

Respekt: 320,5
Respekt: 320,5Respekt: 320,5Respekt: 320,5

Zapewne nie masz mety, a je?li masz to wpisz w konsole refresh.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
switel1200
Wysłany: 2017-06-21, 18:25


switel1200

Uczeń LUA






Wiek: 25
Na forum: 3409 dni
Posty: 37
Nick w MP: Switel12

Piwa: 7

Respekt: 55,3

dalej nic nie pokazuje mi si? w zasobach bo ja mam serwer przez IP kompa

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 18:36


neku^







Wiek: 24
Na forum: 3522 dni
Posty: 461
Nick w MP: neku^

Piwa: 1186

Respekt: 320,5
Respekt: 320,5Respekt: 320,5Respekt: 320,5

Stworzy?e? oddzielny skrypt? Je?li tak to czy masz met??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 19:14


switel1200

Uczeń LUA






Wiek: 25
Na forum: 3409 dni
Posty: 37
Nick w MP: Switel12

Piwa: 7

Respekt: 55,3

Tak mam mete chyba, ze powina byc inna

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 19:19


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

switel1200,jak jej nie poka?esz to si? nie dowiemy + jak to ma dzia?a?? nie ma okre?lonego pojazdu gracza, nawet samego gracza...

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-21, 19:26


switel1200

Uczeń LUA






Wiek: 25
Na forum: 3409 dni
Posty: 37
Nick w MP: Switel12

Piwa: 7

Respekt: 55,3

Pokaza? bym ale jestem na telefonie

[ Dodano: 2017-06-21, 19:29 ]
function syrena() 
if pojazd and getVehicleController(pojazd)==localPlayer then
local id =getElementModel(pojazd)
if id == 597 
removeVehicleSirens(vehsetVehicleSirens veh10.500, -0.4000.9005660255255 addVehicleSirens veh12falsefalsefalsetrue setVehicleSirens veh2, -0.500, -0.4000.9005660255255 addVehicleSirens veh22falsefalsefalsetrue setVehicleSirens veh30.3002.5000.0005660255255 addVehicleSirens veh32falsefalsefalsetrue setVehicleSirens veh4, -0.3002.5000.0005660255255 addVehicleSirens veh42falsefalsefalsetrue setVehicleSirens veh50.800, -2.7000.0005660255255 addVehicleSirens veh52falsefalsefalsetrue setVehicleSirens veh6, -0.800, -2.7000.0005660255255 addVehicleSirens veh62falsefalsefalsetrue end 
bindKey("h""down"syrena)

addEventHandler("onVehicleStartEnter"root, function(thePlayer,seat)
    if seat ~= 0 then return end
    
    -- Tw?j kod na wsiadanie do pojazdu.
end

To jest skrypt

[ Dodano: 2017-06-21, 19:31 ]
A to meta
<meta>
 <script src="syreny.lua" type="client" />
</meta


[ Dodano: 2017-06-21, 21:50 ]
dbn69, Pomozesz?

Postaw piwo autorowi tego posta
 

 
Tagi: syreny :: świetlne.
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