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

Wysłany: 2016-08-31, 13:45


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
Witam posiadam skrypt z mta community i nie umiem go podpi?c pod createVehicle czy jakos tak bo jestem w tym zielony za ch?ci i pomoc stawiam piwko. Oto Skrypt----> https://community.multitheftauto.com/index.php?p=resources&s=details&id=7567

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 15:01


Pumelowsky

Amator 3D






Wiek: 24
Na forum: 4322 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

podpi?? ? opisz tw?j problem

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 15:04


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
@PumaPL123 chodzi mi o to zeby skrypt dzia?al poprawnie bo gdy go odpale to syreny nie dzialaj?. Autor pisa? ze trzeba cos z createVehicle zrobi?.

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 15:07


AteX







Wiek: 27
Na forum: 4156 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

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

Z tego co widz? syreny dzia?aj? z pojazdami z tabeli:
PoliceLightsVehs = {--rot, wei?, blau
["Police LS"] = true,
["Police SF"] = true,
["Police LV"] = true,
["Police Ranger"] = true,
["HPV1000"] = true,
["FBI Rancher"] = true,
["FBI Truck"] = true,
}

EmergencyLightsVehs = {--wei?, rot, wei?
["Ambulance"] = true,
["Fire Truck"] = true,
}
YellowLightsVehs = { -- rot, gelb, rot
["Barracks"] = true,
["Patriot"] = true,
["Fire Truck Ladder"] = true,
["Enforcer"] = true,
["Towtruck"] = true,
["S.W.A.T."] = true,
["Sweeper"] = true,
["Utility Van"] = true,
}

UndercoverLights = {
["Infernus"] = true,
["Buffalo"] = true,
["Cheetah"] = true,
}

Gdy w??czysz skrypt. Ka?dy z tych pojazd?w pod klawiszem G powinien mie? syreny.

Chocia? na samym dole skryptu wygl?da to tak:
function carspawn()
if isTestmodeEnabled == true then
local inf = createVehicle(411,-708,975,13)
removeVehicleSirens(inf)
addVehicleSirens(inf, 6, 2, true, true, false, false)
setVehicleSirens(inf, 1, -0.7, 2.8, -0.45, 255, 0, 0, 255, 255)
setVehicleSirens(inf, 2, 0.7, 2.8, -0.45, 0, 0, 255, 255, 255)
setVehicleSirens(inf, 3, 0.2, 0.6, 0.55, 0, 0, 255, 255, 255)
setVehicleSirens(inf, 4, -0.2, 0.6, 0.55, 255, 0, 0, 255, 255)
setVehicleSirens(inf, 5, -0.85, -2.55, 0.05, 255, 0, 0, 255, 255)
setVehicleSirens(inf, 6, 0.85, -2.55, 0.05, 0, 0, 255, 255, 255)

local che = createVehicle(415,-712,975,13)
removeVehicleSirens(che)
addVehicleSirens(che, 6, 2, true, true, false, false)
setVehicleSirens(che, 1, -0.2, 0.17, 0.55, 255, 0, 0, 200, 200)
setVehicleSirens(che, 2, 0.2, 0.17, 0.55, 0, 0, 255, 200, 200)
setVehicleSirens(che, 3, -0.845, 2.71, -0.2, 255, 145.4, 0, 200, 200)
setVehicleSirens(che, 4, 0.845, 2.71, -0.2, 255, 145.4, 0, 200, 200)
setVehicleSirens(che, 5, -0.82, -2.5, 0.05, 255, 145.4, 0, 200, 200)
setVehicleSirens(che, 6, 0.82, -2.5, 0.05, 255, 145.4, 0, 200, 200)

local enf = createVehicle(427,-716,975,13)
removeVehicleSirens(enf)
addVehicleSirens(enf, 8, 2, true, true, false, false)
setVehicleSirens(enf, 1, 1.2, 0.1, 1.3, 255, 142.8, 0, 198.9, 198.9)
setVehicleSirens(enf, 2, 1.2, -1.6, 1.3, 255, 145.4, 0, 200, 200)
setVehicleSirens(enf, 3, 1.2, -3.4, 1.3, 255, 145.4, 0, 200, 200)
setVehicleSirens(enf, 4, -1.2, 0.1, 1.3, 255, 145.4, 0, 200, 200)
setVehicleSirens(enf, 5, -1.2, -1.6, 1.3, 255, 145.4, 0, 200, 200)
setVehicleSirens(enf, 6, -1.2, -3.4, 1.3, 255, 145.4, 0, 200, 200)
setVehicleSirens(enf, 7, -0.4, 1.1, 1.5, 255, 0, 0, 255, 255)
setVehicleSirens(enf, 8, 0.4, 1.1, 1.5, 255, 0, 0, 255, 255)

local pd = createVehicle(598,-704,975,13)
removeVehicleSirens(pd)
addVehicleSirens(pd, 5, 2, true, true, false, false)
setVehicleSirens(pd, 1, -0.5, -0.4, 1, 255, 0, 0, 255, 255)
setVehicleSirens(pd, 2, 0.5, -0.4, 1, 0, 0, 255, 255, 255)
setVehicleSirens(pd, 3, 0, -0.4, 1, 255, 255, 255, 255, 255)
setVehicleSirens(pd, 4, 0.6, 2.5, 0, 255, 255, 255, 255, 100)
setVehicleSirens(pd, 5, -0.6, 2.5, 0, 255, 255, 255, 255, 100)

local rang = createVehicle(599,-700,975,13)
removeVehicleSirens(rang)
addVehicleSirens(rang, 3, 2, true, true, false, false)
setVehicleSirens(rang, 1, -0.6, 0, 1.2, 255, 0, 0, 255, 255)
setVehicleSirens(rang, 2, 0.6, 0, 1.2, 0, 0, 255, 255, 255)
setVehicleSirens(rang, 3, 0, 0, 1.2, 255, 255, 255, 255, 255)

local tow = createVehicle(525,-696,975,13)
removeVehicleSirens(tow)
addVehicleSirens(tow, 3, 2, true, true, false, true)
setVehicleSirens(tow, 1, -0.5, -0.5, 1.5, 255, 0, 0, 255, 255)
setVehicleSirens(tow, 2, 0.6, -0.5, 1.5, 255, 0, 0, 255, 255)
setVehicleSirens(tow, 3, 0, -0.5, 1.5, 255, 145.4, 0, 255, 255)

local firet = createVehicle(407,-688,969,13,0,0,90)
removeVehicleSirens(firet)
addVehicleSirens(firet, 8, 2, true, true, false, false)
setVehicleSirens(firet, 1, -0.7, 3.2, 1.4, 255, 0, 0, 255, 255)
setVehicleSirens(firet, 2, 0.7, 3.2, 1.4, 255, 0, 0, 255, 255)
setVehicleSirens(firet, 3, 0.2, 3.2, 1.4, 255, 255, 255, 255, 255)
setVehicleSirens(firet, 4, -0.2, 3.2, 1.4, 255, 255, 255, 255, 255)
setVehicleSirens(firet, 5, 1.1, -3.65, 0.1, 255, 145.4, 0, 255, 112.2)
setVehicleSirens(firet, 6, -1.1, -3.65, 0.1, 255, 145.4, 0, 255, 112.2)
setVehicleSirens(firet, 7, -0.8, 4.2, 0.1, 255, 145.4, 0, 255, 112.2)
setVehicleSirens(firet, 8, 0.8, 4.2, 0.1, 255, 145.4, 0, 255, 112.2)

local firel = createVehicle(544,-688,963,13,0,0,90)
--(hier muss nichts gemacht werden, der spawn dient nur zur Demo) 

local ambul = createVehicle(416,-688,958,13,0,0,90)
removeVehicleSirens(ambul)
addVehicleSirens(ambul, 7, 2, true, true, false, false)
setVehicleSirens(ambul, 1, -0.5, 0.9, 1.3, 255, 0, 0, 255, 255)
setVehicleSirens(ambul, 2, 0, 0.9, 1.3, 255, 255, 255, 255, 255)
setVehicleSirens(ambul, 3, 0.4, 0.9, 1.3, 255, 0, 0, 255, 255)
setVehicleSirens(ambul, 4, -1.2, -3.5, 1.5, 255, 0, 0, 255, 255)
setVehicleSirens(ambul, 5, 1.2, -3.5, 1.5, 255, 0, 0, 255, 255)
setVehicleSirens(ambul, 6, 0.4, -3.75, 1.5, 255, 145.4, 0, 255, 255)
setVehicleSirens(ambul, 7, -0.4, -3.75, 1.5, 255, 145.4, 0, 255, 255)

local util = createVehicle(552,-675,958,13,0,0,90)
removeVehicleSirens(util)
addVehicleSirens(util, 1, 2, false, true, true, true)
setVehicleSirens(util, 1, 1, -1.7, 1.5, 255, 145.4, 0, 255, 168.3)

local sweep = createVehicle(574,-680,958,13,0,0,180)
removeVehicleSirens(sweep)
addVehicleSirens(sweep, 3, 2, false, true, true, true)
setVehicleSirens(sweep, 1, 0.4, 0.5, 1.4, 255, 0, 0, 255, 63.8)
setVehicleSirens(sweep, 2, -0.4, 0.5, 1.4, 255, 0, 0, 255, 63.8)
setVehicleSirens(sweep, 3, 0, 0.5, 1.4, 255, 255, 255, 255, 147.9)
end
end

Tutaj masz jak dodawa? te syreny przy createVehicle. Lecz z tego co czytam jest to funkcja testowa i przed w??czeniem skryptu zaleca si? ustawi? zmienn? isTestmodeEnabled na false, ale te? jest to przyk?ad dodawania syren.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Ostatnio zmieniony przez AteX 2016-08-31, 15:13, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 15:11


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
@Atex wiem tylko gdy klikne G nie w?aczaj? mi si? te syreny w tym rzecz.

[ Dodano: 2016-08-31, 15:13 ]
@Atex a mo?esz wyt?umaczy? mi jak to dodawac bo jestem w tym zielony ;-;.

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 15:16


AteX







Wiek: 27
Na forum: 4156 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

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

Poczytaj na wiki co za co odpowiada:

Więcej informacji znajdziesz w Wikipedii MTA:

addVehicleSirens


Więcej informacji znajdziesz w Wikipedii MTA:

setVehicleSirens

I przeanalizuj t? funkcj? carspawn, bo tam wszystko ?adnie wida? jak to dodawa?.

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

 
Wysłany: 2016-08-31, 15:21


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
@Atex jak juz pisa?em UP to ja tego nie ogarniam createVehicle i szukam pomocy ;-;

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 19:30


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4979 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

a co tu jest do ogarniania:


local x,y,z = getElementPosition(localPlayer)
createVehicle(411, x+1, y,z)


uruchom taki kod na client-side i zobacz jak to dzia?a... vehicles ID masz na wiki opisane.
do auta nie bedziesz mogl wsiasc, poniewaz zostanie ono na client side stworzone, czyli u ciebie na komputerze, co rowniez wi??e si? z tym, ?e nikt pr?cz ciebie tego auta nie widzi.

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 20:31


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4290 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4661

Respekt: 1436,8
Respekt: 1436,8

Allansso, Nie chc? tutaj dawa? funkcji w tagu [wmta][/wmta] bo przeniesie ci? na angielsk? wersje, dlatego podam link.

https://wiki.multitheftauto.com/wiki/PL/CreateVehicle

Jest to opis ca?ej funkcji po Polsku.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 22:35


GabWas







Wiek: 24
Na forum: 4022 dni
Posty: 289
Nick w MP: GabWas

Piwa: 65

Respekt: 231,5
Respekt: 231,5Respekt: 231,5

"marcin778" napisał/a:

Allansso, Nie chc? tutaj dawa? funkcji w tagu [wmta][/wmta] bo przeniesie ci? na angielsk? wersje, dlatego podam link.

Wystarczy?o doda? "PL/" przed nazw? funkcji:

Więcej informacji znajdziesz w Wikipedii MTA:

PL/createVehicle


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-31, 23:22


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
@Jurandovsky co? pr?bowa?em i tylko w police ls dzia?a?o.
A co to ch?opak?w do g?ry ja prosz? o pomoc A nie o jakie? strony kt?rych do ko?ca nie ogarniam.

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-01, 07:18


GabWas







Wiek: 24
Na forum: 4022 dni
Posty: 289
Nick w MP: GabWas

Piwa: 65

Respekt: 231,5
Respekt: 231,5Respekt: 231,5

"Allansso" napisał/a:

A co to ch?opak?w do g?ry ja prosz? o pomoc A nie o jakie? strony kt?rych do ko?ca nie ogarniam.

Masz tam wszystko wyja?nione, w dodatku po polsku. Rusz dup?, u?yj m?zgu i bierz si? za czytanie, bo my Ci nie b?dziemy podawa? gotowc?w bo i tak potem nic z nich nie zrozumiesz, wi?c co mia?oby to na celu?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-01, 16:42


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
Dobra mo?na zamkn?? temat wida? pomoc 2/10

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-01, 17:34


GabWas







Wiek: 24
Na forum: 4022 dni
Posty: 289
Nick w MP: GabWas

Piwa: 65

Respekt: 231,5
Respekt: 231,5Respekt: 231,5

"Allansso" napisał/a:

Dobra mo?na zamkn?? temat wida? pomoc 2/10

Jedyn? pomoc jak? tu uzyskasz, to pomoc w nauczeniu si?. Ty wolisz i?? na ?atwizn? i czeka? na jakiego? naiwniaka co Ci gotowiec poda, bo szanowny Pan sobie tak za?yczy?. Bozia r?czki da?a? A oczy i m?zg? To kliknij w te linki co Ci wy?ej podali?my, przeczytaj, przeanalizuj i nie st?kaj, ?e nikt Ci nie pomaga. Nie po to kilkadziesi?t os?b t?umaczy Wiki MTA na j?zyk polski, ?eby? teraz jakie? ?a?osne 2/10 nam "wystawia?", hrabio.

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: umiem :: createvehicle
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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