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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 23
Na forum: 4181 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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

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

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

EmergencyLightsVehs = {--wei?, rotwei?
["Ambulance"] = true,
["Fire Truck"] = true,
}
YellowLightsVehs = { -- rotgelbrot
["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(inf62truetruefalsefalse)
setVehicleSirens(inf1, -0.72.8, -0.4525500255255)
setVehicleSirens(inf20.72.8, -0.4500255255255)
setVehicleSirens(inf30.20.60.5500255255255)
setVehicleSirens(inf4, -0.20.60.5525500255255)
setVehicleSirens(inf5, -0.85, -2.550.0525500255255)
setVehicleSirens(inf60.85, -2.550.0500255255255)

local che createVehicle(415,-712,975,13)
removeVehicleSirens(che)
addVehicleSirens(che62truetruefalsefalse)
setVehicleSirens(che1, -0.20.170.5525500200200)
setVehicleSirens(che20.20.170.5500255200200)
setVehicleSirens(che3, -0.8452.71, -0.2255145.40200200)
setVehicleSirens(che40.8452.71, -0.2255145.40200200)
setVehicleSirens(che5, -0.82, -2.50.05255145.40200200)
setVehicleSirens(che60.82, -2.50.05255145.40200200)

local enf createVehicle(427,-716,975,13)
removeVehicleSirens(enf)
addVehicleSirens(enf82truetruefalsefalse)
setVehicleSirens(enf11.20.11.3255142.80198.9198.9)
setVehicleSirens(enf21.2, -1.61.3255145.40200200)
setVehicleSirens(enf31.2, -3.41.3255145.40200200)
setVehicleSirens(enf4, -1.20.11.3255145.40200200)
setVehicleSirens(enf5, -1.2, -1.61.3255145.40200200)
setVehicleSirens(enf6, -1.2, -3.41.3255145.40200200)
setVehicleSirens(enf7, -0.41.11.525500255255)
setVehicleSirens(enf80.41.11.525500255255)

local pd createVehicle(598,-704,975,13)
removeVehicleSirens(pd)
addVehicleSirens(pd52truetruefalsefalse)
setVehicleSirens(pd1, -0.5, -0.4125500255255)
setVehicleSirens(pd20.5, -0.4100255255255)
setVehicleSirens(pd30, -0.41255255255255255)
setVehicleSirens(pd40.62.50255255255255100)
setVehicleSirens(pd5, -0.62.50255255255255100)

local rang createVehicle(599,-700,975,13)
removeVehicleSirens(rang)
addVehicleSirens(rang32truetruefalsefalse)
setVehicleSirens(rang1, -0.601.225500255255)
setVehicleSirens(rang20.601.200255255255)
setVehicleSirens(rang3001.2255255255255255)

local tow createVehicle(525,-696,975,13)
removeVehicleSirens(tow)
addVehicleSirens(tow32truetruefalsetrue)
setVehicleSirens(tow1, -0.5, -0.51.525500255255)
setVehicleSirens(tow20.6, -0.51.525500255255)
setVehicleSirens(tow30, -0.51.5255145.40255255)

local firet createVehicle(407,-688,969,13,0,0,90)
removeVehicleSirens(firet)
addVehicleSirens(firet82truetruefalsefalse)
setVehicleSirens(firet1, -0.73.21.425500255255)
setVehicleSirens(firet20.73.21.425500255255)
setVehicleSirens(firet30.23.21.4255255255255255)
setVehicleSirens(firet4, -0.23.21.4255255255255255)
setVehicleSirens(firet51.1, -3.650.1255145.40255112.2)
setVehicleSirens(firet6, -1.1, -3.650.1255145.40255112.2)
setVehicleSirens(firet7, -0.84.20.1255145.40255112.2)
setVehicleSirens(firet80.84.20.1255145.40255112.2)

local firel createVehicle(544,-688,963,13,0,0,90)
--(hier muss nichts gemacht werdender spawn dient nur zur Demolocal ambul createVehicle(416,-688,958,13,0,0,90)
removeVehicleSirens(ambul)
addVehicleSirens(ambul72truetruefalsefalse)
setVehicleSirens(ambul1, -0.50.91.325500255255)
setVehicleSirens(ambul200.91.3255255255255255)
setVehicleSirens(ambul30.40.91.325500255255)
setVehicleSirens(ambul4, -1.2, -3.51.525500255255)
setVehicleSirens(ambul51.2, -3.51.525500255255)
setVehicleSirens(ambul60.4, -3.751.5255145.40255255)
setVehicleSirens(ambul7, -0.4, -3.751.5255145.40255255)

local util createVehicle(552,-675,958,13,0,0,90)
removeVehicleSirens(util)
addVehicleSirens(util12falsetruetruetrue)
setVehicleSirens(util11, -1.71.5255145.40255168.3)

local sweep createVehicle(574,-680,958,13,0,0,180)
removeVehicleSirens(sweep)
addVehicleSirens(sweep32falsetruetruetrue)
setVehicleSirens(sweep10.40.51.42550025563.8)
setVehicleSirens(sweep2, -0.40.51.42550025563.8)
setVehicleSirens(sweep300.51.4255255255255147.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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 4838 dni
Posty: 915

Piwa: 2697

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

a co tu jest do ogarniania:


local x,y,getElementPosition(localPlayer)
createVehicle(411x+1y,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: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

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: 3881 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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 3881 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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 3881 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 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