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

Wysłany: 2019-03-19, 15:45


mrmay4141

KOR Gaming Innovator






Wiek: 28
Na forum: 4860 dni
Posty: 86
Nick w MP: Sexyvise

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Witam, przyszed?em tym razem z problemem dotycz?cym setvehiclecomponent, a mo?e nawet i nie problemem, ale pytaniem. Ot?? wszystko dzia?a jak powinno, ale chcia?bym ?eby?cie mi troch? przerobili kawa?ek kodu. Ot?? po stworzeniu pojazdu pokazuj? si? wszystkie komponenty jakie s? dodane i nie ukrywajmy, je?li jest ich du?o, wygl?da to troch? niechlujnie je?li wszystkie si? na siebie nak?adaj?. Chcia?bym, aby po pojawieniu si? pojazdu wszystkie dodatkowe komponenty by?y ukryte. P?ki co jest tylko komenda(kt?r? dam ni?ej), kt?ra usuwa dodatkowe i zostawia te podstawowe.

Kod:

addCommandHandler("alldef", -- for vehicle component
function()
local theVeh = getPedOccupiedVehicle(localPlayer)
if (theVeh) then
setVehicleComponentVisible(theVeh, "roof1", false) -- hides the component
setVehicleComponentVisible(theVeh, "feet1", false) -- hides the component
setVehicleComponentVisible(theVeh, "feet2", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler1", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler1.2", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler2", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler3", false) -- hides the component
setVehicleComponentVisible(theVeh, "bumper1", false) -- hides the component
setVehicleComponentVisible(theVeh, "fbumper1", false) -- hides the component
setVehicleComponentVisible(theVeh, "skirts1", false) -- hides the component
setVehicleComponentVisible(theVeh, "bonnet1", false) -- hides the component
setVehicleComponentVisible(theVeh, "fbumperd", true) -- hides the component
setVehicleComponentVisible(theVeh, "bumperd", true) -- hides the component
setVehicleComponentVisible(theVeh, "roof", true) -- hides the component
setVehicleComponentVisible(theVeh, "feet", true) -- hides the component
setVehicleComponentVisible(theVeh, "bonnet", true) -- hides the component
end
end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-19, 17:18


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3


Więcej informacji znajdziesz w Wikipedii MTA:

onClientElementStreamIn
i po zestreamowaniu pojazdu ukrywaj mu te komponenty kt?rych nie chcesz mie?. Domy?lnie stworzone auto ma wszystkie pokazane.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-19, 23:12


mrmay4141

KOR Gaming Innovator






Wiek: 28
Na forum: 4860 dni
Posty: 86
Nick w MP: Sexyvise

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
"Avenged" napisał/a:


Więcej informacji znajdziesz w Wikipedii MTA:

onClientElementStreamIn
i po zestreamowaniu pojazdu ukrywaj mu te komponenty kt?rych nie chcesz mie?. Domy?lnie stworzone auto ma wszystkie pokazane.


Wrzuci?by? mi to do tego kodu?

Kolejny problem to to, ?e trzeba by by?o przerobi? to na stron? servera, a kompletnie nie ogarniam jak to zrobi? :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-20, 13:57


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

mrmay4141, po stronie serwera tego nie zrobisz. Ja wkleja? Ci tego nie b?d? - masz przyk?ad na wiki podany ;)

Postaw piwo autorowi tego posta
 

 
Tagi: setvehiclecomponent :: ustawienia :: domyślne
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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