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

Wysłany: 2015-08-13, 15:41


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam jak zrobi?/przerobi? ten kod pod prawko na kat.B?


server

local egzaminowany=nil


function sethpnpc ()
end
setTimersethpnpc1000,)
  local marker createMarker(2240.7998046875,1682.7998046875,1582.5999755859"cylinder"225500)
   function onhitsource ) 
      outputChatBox("Aby zacz?? kurs prawa jazdy wpisz /kurs"source)
end
addEventHandler"onMarkerHit"markeronhit)


function kurs(source)
 if isElementWithinMarker sourcemarker )
 then
local konto getPlayerAccount source )
 
if not getAccountData(konto,"prawojazdy" then
outputChatBox("Zaczynasz kurs prawa jazdy. Wiedz, ?e nie mo?esz w nic waln??, powodzenia."source)
auto createVehicle 410,  2334.24,1730.75,10.47,359.8,0.0,1.3000)
 setVehicleColor auto255255255 )
 warpPlayerIntoVehicle sourceauto )
 setElementData(auto"pojazd_paliwo"50)
 setElementData(auto"pojazd_opis""Nauka Prawa Jazy\nLas Venturas")    
 toggleControl(source"enter_exit"false)
triggerClientEvent ("zdajemyprawkotrolololo"source )
else
   outputChatBox("Masz ju? prawo jazdy."source)
end
end
end
addCommandHandler("kurs"kurs)

function zdal ()
local nick getPlayerName source)
      outputChatBox("Kurs prawa jazdy zako?czony pomy?lnie! Gratulacje!"source )
konto getPlayerAccount source )
setAccountData konto"prawojazdy"true )
end

addEvent"prawko.zdal"true )
addEventHandler"prawko.zdal"rootzdal )

function oblal ()
local nick getPlayerName source)

      outputChatBox("Egzamin zako?czony pora?k?! Pojazd uszkodzony."source )
end

addEvent"prawko.oblal"true )
addEventHandler"prawko.oblal"rootoblal )

function zabierzauto ( )
local auto getPedOccupiedVehiclesource )
destroyElement auto )
toggleControl(source"enter_exit"true)
end

addEvent"prawkoautosadasdas"true )
addEventHandler"prawkoautosadasdas"rootzabierzauto )

function sadasdsa source )
konto getPlayerAccount source )
setAccountData konto"prawojazdy"falseend
addCommandHandler("zbprawko"sadasdsa  )


client


function markerygo source )
     marker1 createMarker 2330.25805664061756.563720703110.225738525391"checkpoint"3.025500100end
addEvent"zdajemyprawkotrolololo"true )
addEventHandler"zdajemyprawkotrolololo",localPlayermarkerygo )


function MH1 (hitPlayermatchingDimension)
 if hitPlayer == localPlayer then
  if source == marker1 then
destroyElement marker1 )
 marker2 createMarker (  2329.26660156251761.495605468810.09069442749"checkpoint"3.025500100end
  if source == marker2 then 
destroyElement marker2 )
 marker3 createMarker 2320.34472656251773.997680664110.162864685059"checkpoint"3.025500100)

end
  if source == marker3 then 
destroyElement marker3 )
 marker4 createMarker 2281.27075195311775.130004882810.088541984558"checkpoint"3.025500100)

end
  if source == marker4 then 
destroyElement marker4 )
 marker5 createMarker 2237.47412109381775.310913085910.092795372009"checkpoint"3.025500100)

end
  if source == marker5 then 
destroyElement marker5 )
 marker6 createMarker 2186.09912109381775.319580078110.091461181641"checkpoint"3.025500100)

end
  if source == marker6 then 
destroyElement marker6 )
 marker7 createMarker 2130.96386718751774.919311523410.09029006958"checkpoint"3.025500100)

end
  if source == marker7 then 
destroyElement marker7 )
 marker8 createMarker 2104.41967773441786.878051757810.075868606567"checkpoint"3.025500100)

end
  if source == marker8 then 
destroyElement marker8 )
 marker9 createMarker 2119.84252929691806.683227539110.104119300842"checkpoint"3.025500100)

end
  if source == marker9 then 
destroyElement marker9 )
 marker10 createMarker 2140.32788085941845.469970703110.091953277588"checkpoint"3.025500100)

end
  if source == marker10 then 
destroyElement marker10 )
 marker11 createMarker 2149.14282226561894.442138671910.09365272522"checkpoint"3.025500100)

end
  if source == marker11 then 
destroyElement marker11 )
marker12 createMarker 2150.15087890631953.475708007810.098871231079"checkpoint"3.025500100)

end
  if source == marker12 then 
destroyElement marker12 )
marker13 createMarker 2150.22192382812010.009521484410.091565132141"checkpoint"3.025500100)

end
  if source == marker13 then 
destroyElement marker13 )
marker14 createMarker 2149.886718752072.09960937510.098825454712"checkpoint"3.025500100)

end
  if source == marker14 then 
destroyElement marker14 )
marker15 createMarker (  2149.98925781252138.104980468810.090579032898"checkpoint"3.025500100)

end
  if source == marker15 then 
destroyElement marker15 )
marker16 createMarker (  2149.61572265632205.765380859410.090839385986"checkpoint"3.025500100)

end
  if source == marker16 then 
destroyElement marker16 )
marker17 createMarker (  2161.74462890632280.515869140610.078065872192"checkpoint"3.025500100)

end
  if source == marker17 then 
destroyElement marker17 )
marker18 createMarker (  2199.23852539062334.087158203110.102544784546"checkpoint"3.025500100)

end
  if source == marker18 then 
destroyElement marker18 )
marker19 createMarker 2229.41625976562397.780273437510.085474014282"checkpoint"3.025500100)

end
  if source == marker19 then 
destroyElement marker19 )
marker20 createMarker (  2259.593752411.960449218810.097455024719"checkpoint"3.025500100)

end
  if source == marker20 then 
destroyElement marker20 )
marker21 createMarker (  2322.27050781252411.979003906310.091292381287"checkpoint"3.025500100)

end
  if source == marker21 then 
destroyElement marker21 )
marker22 createMarker (  2426.01708984382396.512207031310.086460113525"checkpoint"3.025500100)

end
  if source == marker22 then 
destroyElement marker22 )
marker23 createMarker (  2425.29003906252356.63085937510.091698646545"checkpoint"3.025500100)

end
  if source == marker23 then 
destroyElement marker23 )
marker24 createMarker (  2425.07641601562300.758544921910.091404914856"checkpoint"3.025500100)

end
  if source == marker24 then 
destroyElement marker24 )
marker25 createMarker (  2424.54370117192238.324951171910.211097717285"checkpoint"3.025500100)

end
  if source == marker25 then 
destroyElement marker25 )
marker26 createMarker (  2406.66894531252234.698974609410.09229850769"checkpoint"3.025500100)

end
  if source == marker26 then 
destroyElement marker26 )
marker27 createMarker (  2373.89208984382234.838867187510.096920013428"checkpoint"3.025500100)

end
  if source == marker27 then 
destroyElement marker27 )
marker28 createMarker (  2346.74975585942213.488769531310.096753120422"checkpoint"3.025500100)

end
  if source == marker28 then 
destroyElement marker28 )
marker29 createMarker (  2348.24975585942184.770751953110.09220790863"checkpoint"3.025500100)

end
  if source == marker29 then 
destroyElement marker29 )
marker30 createMarker (  2347.64160156252142.615722656310.100728034973"checkpoint"3.025500100)

end
  if source == marker30 then 
destroyElement marker30 )
marker31 createMarker (  2347.62963867192094.694824218810.088534355164"checkpoint"3.025500100)

end
  if source == marker31 then 
destroyElement marker31 )
marker32 createMarker (  2346.91870117192037.840820312510.040077209473"checkpoint"3.025500100)

end
  if source == marker32 then 
destroyElement marker32 )
marker33 createMarker (  2320.82885742192024.13085937510.092637062073"checkpoint"3.025500100)

end
  if source == marker33 then 
destroyElement marker33 )
marker34 createMarker (  2283.71997070312023.534545898410.099239349365"checkpoint"3.025500100)

end
  if source == marker34 then 
destroyElement marker34 )
marker35 createMarker 2239.95556640632023.726928710910.09942150116"checkpoint"3.025500100)

end
  if source == marker35 then 
destroyElement marker35 )
marker36 createMarker (  2190.79150390632024.003295898410.089919090271"checkpoint"3.025500100)

end
  if source == marker36 then 
destroyElement marker36 )
marker37 createMarker (  2149.35839843752035.387939453110.088510513306"checkpoint"3.025500100)

end
  if source == marker37 then 
destroyElement marker37 )
marker38 createMarker (  2147.79858398442088.673339843810.098752975464"checkpoint"3.025500100)

end
  if source == marker38 then 
destroyElement marker38 )
marker39 createMarker (  2184.09619140632137.444824218810.070822715759"checkpoint"3.025500100)

end
  if source == marker39 then 
destroyElement marker39 )
marker40 createMarker (  2229.80786132812137.596923828110.09125995636"checkpoint"3.025500100)

end
  if source == marker40 then 
destroyElement marker40 )
marker41 createMarker (  2300.10473632812137.4414062510.090913772583"checkpoint"3.025500100)

end
  if source == marker41 then 
destroyElement marker41 )
marker42 createMarker (  2346.64697265632115.57617187510.083622932434"checkpoint"3.025500100)

end
  if source == marker42 then 
destroyElement marker42 )
marker43 createMarker (  2347.71069335942059.356933593810.092763900757"checkpoint"3.025500100)

end
  if source == marker43 then 
destroyElement marker43 )
marker44 createMarker (  2347.81933593751973.002075195310.278070449829"checkpoint"3.025500100)

end
  if source == marker44 then 
destroyElement marker44 )
marker45 createMarker (  2347.05468751936.386352539110.096214294434"checkpoint"3.025500100)

end
  if source == marker45 then 
destroyElement marker45 )
marker46 createMarker (  2303.96264648441894.274291992210.091844558716"checkpoint"3.025500100)

end
  if source == marker46 then 
destroyElement marker46 )
marker47 createMarker (  2248.68041992191894.197021484410.090696334839"checkpoint"3.025500100)

end
  if source == marker47 then 
destroyElement marker47 )
marker48 createMarker (  2196.75878906251894.499755859410.090870857239"checkpoint"3.025500100)

end
  if source == marker48 then 
destroyElement marker48 )
marker49 createMarker (  2149.63989257811956.638793945310.098266601563"checkpoint"3.025500100)

end
  if source == marker49 then 
destroyElement marker49 )
marker50 createMarker (  2149.53002929692096.659423828110.098547935486"checkpoint"3.025500100)

end
  if source == marker50 then 
destroyElement marker50 )
marker51 createMarker (  2134.79321289062132.000976562510.108583450317"checkpoint"3.025500100)

end
  if source == marker51 then 
destroyElement marker51 )
marker52 createMarker (  2127.54370117192101.284912109410.086023330688"checkpoint"3.025500100)

end
  if source == marker52 then 
destroyElement marker52 )
marker53 createMarker (  2127.18847656252053.891357421910.090987205505"checkpoint"3.025500100)

end
  if source == marker53 then 
destroyElement marker53 )
marker54 createMarker (  2126.6347656251979.034667968810.098132133484"checkpoint"3.025500100)

end
  if source == marker54 then 
destroyElement marker54 )
marker55 createMarker (  2126.15673828131914.868652343810.090879440308"checkpoint"3.025500100)

end
  if source == marker55 then 
destroyElement marker55 )
marker56 createMarker 2124.285156251861.732910156310.08208656311"checkpoint"3.025500100)

end
  if source == marker56 then 
destroyElement marker56 )
marker57 createMarker (  2106.59545898441827.388916015610.089022636414"checkpoint"3.025500100)

end
  if source == marker57 then 
destroyElement marker57 )
marker58 createMarker (  2085.2910156251782.831542968810.09103012085"checkpoint"3.025500100)

end
  if source == marker58 then 
destroyElement marker58 )
marker59 createMarker (  2057.99926757811726.101318359410.091327667236"checkpoint"3.025500100)

end
  if source == marker59 then 
destroyElement marker59 )
marker60 createMarker (  2045.36975097661675.240600585910.090759277344"checkpoint"3.025500100)

end
  if source == marker60 then 
destroyElement marker60 )
marker61 createMarker (  2060.43701171881646.142333984410.092084884644"checkpoint"3.025500100)

end
  if source == marker61 then 
destroyElement marker61 )
marker62 createMarker (  2135.93774414061652.117553710910.116108894348"checkpoint"3.025500100)

end
  if source == marker62 then 
destroyElement marker62 )
marker63 createMarker (  2160.20751953131672.594116210910.143789291382"checkpoint"3.025500100)
end
  if source == marker63 then 
destroyElement marker63 )


local auto =  getPedOccupiedVehicle hitPlayer)
local hpauta getElementHealth auto )
  localPlayer getLocalPlayer() 
if hpauta 999 then
    triggerServerEvent "prawko.zdal"localPlayer )
    triggerServerEvent "prawkoautosadasdas"localPlayer )
else
  localPlayer getLocalPlayer() 
    triggerServerEvent "prawko.oblal"localPlayer )
    triggerServerEvent "prawkoautosadasdas"localPlayer )
end
end
end
end
addEventHandler "onClientMarkerHit"getRootElement(), MH1 )





Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-13, 16:13


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Dor?b tablic?, w kt?rej wymienisz ID aut, do kt?rych mo?na/nie mo?na wchodzi? je?eli si? ma/nie ma prawka.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-13, 16:16


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

a mozesz mi powiedziec jak ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-13, 16:34


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Zobacz na ten kod i pokombinuj, my pomagamy, a nie robimy za kogo?.


policeVehicles = { [598]=true,[596]=true,[597]=true,[432]=true,[433]=true,[528]=true,[490]=true,[599]=true } -> Pojazdy do kt?rych nie b?dzie mo?na wsi??? bez danego skinapoliceSkins = { [280]=true,[281]=true,[282]=true,[283]=true,[284]=true,[285]=true,[286]=true } -> Znaczy to ,?e z jakim skinem b?dzie mo?na wsi??? do tego pojazdu 

function enterVehicle playerseatjacked ) 
if seat == 0 then 
if ( policeVehicles[getElementModel(source)] ) and ( not policeSkins[getElementModel(player)] ) then 
cancelEvent() 
outputChatBox "Przykro mi ale nie jestes pracownikiem policji!"player ) <- tutaj dodajemy tekst jaki ma nam siwy?wietlagdy nie mamy skina 
end 
end 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-13, 16:43


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

nie ogarniam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-13, 17:00


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

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

kategoriab = {[id_pojazdu] = true, [id_pojazdu] = true}

function start(plrseat)
if seat == 0 then
if kategoriab[getElementModel(source)] then
if not prawko then
cancelEvent()
end
end
end
end
addEventHandler("onVehicleStartEnter"getRootElement(), start)


cos w ten desen


//Dodane znaczniki Lua//DestroY

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
Ostatnio zmieniony przez #404 2015-08-14, 11:11, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-13, 21:44


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

to mam wkleic do kodu ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-14, 09:05


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

AstroStudio, nie. Masz si? w ko?cu sam nauczy? my?le?... Czekasz tylko, a? kto? Ci poda na tacy. We? kod od Jurandovskiego, pokombinuj, przer?b i b?dzie gra?o. Ch?opie, my?l!

Postaw piwo autorowi tego posta
 

 
Tagi: prawko
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