Wysłany: 2015-08-13, 15:41
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4330 dni Posty: 698
Piwa : 2080
Witam jak zrobi?/przerobi? ten kod pod prawko na kat.B?
server
local egzaminowany = nil
function sethpnpc ()
end
setTimer ( sethpnpc , 1000 , 0 )
local marker = createMarker ( 2240.7998046875 , 1682.7998046875 , 1582.5999755859 , "cylinder" , 2 , 255 , 0 , 0 )
function onhit ( source )
outputChatBox ( "Aby zacz?? kurs prawa jazdy wpisz /kurs" , source )
end
addEventHandler ( "onMarkerHit" , marker , onhit )
function kurs ( source )
if isElementWithinMarker ( source , marker )
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.3 , 0 , 0 , 0 )
setVehicleColor ( auto , 255 , 255 , 255 )
warpPlayerIntoVehicle ( source , auto )
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" , root , zdal )
function oblal ()
local nick = getPlayerName ( source )
outputChatBox ( "Egzamin zako?czony pora?k?! Pojazd uszkodzony." , source )
end
addEvent ( "prawko.oblal" , true )
addEventHandler ( "prawko.oblal" , root , oblal )
function zabierzauto ( )
local auto = getPedOccupiedVehicle ( source )
destroyElement ( auto )
toggleControl ( source , "enter_exit" , true )
end
addEvent ( "prawkoautosadasdas" , true )
addEventHandler ( "prawkoautosadasdas" , root , zabierzauto )
function sadasdsa ( source )
konto = getPlayerAccount ( source )
setAccountData ( konto , "prawojazdy" , false )
end
addCommandHandler ( "zbprawko" , sadasdsa )
client
function markerygo ( source )
marker1 = createMarker ( 2330.2580566406 , 1756.5637207031 , 10.225738525391 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
addEvent ( "zdajemyprawkotrolololo" , true )
addEventHandler ( "zdajemyprawkotrolololo" , localPlayer , markerygo )
function MH1 ( hitPlayer , matchingDimension )
if hitPlayer == localPlayer then
if source == marker1 then
destroyElement ( marker1 )
marker2 = createMarker ( 2329.2666015625 , 1761.4956054688 , 10.09069442749 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker2 then
destroyElement ( marker2 )
marker3 = createMarker ( 2320.3447265625 , 1773.9976806641 , 10.162864685059 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker3 then
destroyElement ( marker3 )
marker4 = createMarker ( 2281.2707519531 , 1775.1300048828 , 10.088541984558 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker4 then
destroyElement ( marker4 )
marker5 = createMarker ( 2237.4741210938 , 1775.3109130859 , 10.092795372009 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker5 then
destroyElement ( marker5 )
marker6 = createMarker ( 2186.0991210938 , 1775.3195800781 , 10.091461181641 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker6 then
destroyElement ( marker6 )
marker7 = createMarker ( 2130.9638671875 , 1774.9193115234 , 10.09029006958 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker7 then
destroyElement ( marker7 )
marker8 = createMarker ( 2104.4196777344 , 1786.8780517578 , 10.075868606567 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker8 then
destroyElement ( marker8 )
marker9 = createMarker ( 2119.8425292969 , 1806.6832275391 , 10.104119300842 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker9 then
destroyElement ( marker9 )
marker10 = createMarker ( 2140.3278808594 , 1845.4699707031 , 10.091953277588 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker10 then
destroyElement ( marker10 )
marker11 = createMarker ( 2149.1428222656 , 1894.4421386719 , 10.09365272522 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker11 then
destroyElement ( marker11 )
marker12 = createMarker ( 2150.1508789063 , 1953.4757080078 , 10.098871231079 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker12 then
destroyElement ( marker12 )
marker13 = createMarker ( 2150.2219238281 , 2010.0095214844 , 10.091565132141 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker13 then
destroyElement ( marker13 )
marker14 = createMarker ( 2149.88671875 , 2072.099609375 , 10.098825454712 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker14 then
destroyElement ( marker14 )
marker15 = createMarker ( 2149.9892578125 , 2138.1049804688 , 10.090579032898 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker15 then
destroyElement ( marker15 )
marker16 = createMarker ( 2149.6157226563 , 2205.7653808594 , 10.090839385986 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker16 then
destroyElement ( marker16 )
marker17 = createMarker ( 2161.7446289063 , 2280.5158691406 , 10.078065872192 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker17 then
destroyElement ( marker17 )
marker18 = createMarker ( 2199.2385253906 , 2334.0871582031 , 10.102544784546 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker18 then
destroyElement ( marker18 )
marker19 = createMarker ( 2229.4162597656 , 2397.7802734375 , 10.085474014282 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker19 then
destroyElement ( marker19 )
marker20 = createMarker ( 2259.59375 , 2411.9604492188 , 10.097455024719 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker20 then
destroyElement ( marker20 )
marker21 = createMarker ( 2322.2705078125 , 2411.9790039063 , 10.091292381287 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker21 then
destroyElement ( marker21 )
marker22 = createMarker ( 2426.0170898438 , 2396.5122070313 , 10.086460113525 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker22 then
destroyElement ( marker22 )
marker23 = createMarker ( 2425.2900390625 , 2356.630859375 , 10.091698646545 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker23 then
destroyElement ( marker23 )
marker24 = createMarker ( 2425.0764160156 , 2300.7585449219 , 10.091404914856 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker24 then
destroyElement ( marker24 )
marker25 = createMarker ( 2424.5437011719 , 2238.3249511719 , 10.211097717285 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker25 then
destroyElement ( marker25 )
marker26 = createMarker ( 2406.6689453125 , 2234.6989746094 , 10.09229850769 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker26 then
destroyElement ( marker26 )
marker27 = createMarker ( 2373.8920898438 , 2234.8388671875 , 10.096920013428 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker27 then
destroyElement ( marker27 )
marker28 = createMarker ( 2346.7497558594 , 2213.4887695313 , 10.096753120422 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker28 then
destroyElement ( marker28 )
marker29 = createMarker ( 2348.2497558594 , 2184.7707519531 , 10.09220790863 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker29 then
destroyElement ( marker29 )
marker30 = createMarker ( 2347.6416015625 , 2142.6157226563 , 10.100728034973 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker30 then
destroyElement ( marker30 )
marker31 = createMarker ( 2347.6296386719 , 2094.6948242188 , 10.088534355164 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker31 then
destroyElement ( marker31 )
marker32 = createMarker ( 2346.9187011719 , 2037.8408203125 , 10.040077209473 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker32 then
destroyElement ( marker32 )
marker33 = createMarker ( 2320.8288574219 , 2024.130859375 , 10.092637062073 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker33 then
destroyElement ( marker33 )
marker34 = createMarker ( 2283.7199707031 , 2023.5345458984 , 10.099239349365 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker34 then
destroyElement ( marker34 )
marker35 = createMarker ( 2239.9555664063 , 2023.7269287109 , 10.09942150116 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker35 then
destroyElement ( marker35 )
marker36 = createMarker ( 2190.7915039063 , 2024.0032958984 , 10.089919090271 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker36 then
destroyElement ( marker36 )
marker37 = createMarker ( 2149.3583984375 , 2035.3879394531 , 10.088510513306 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker37 then
destroyElement ( marker37 )
marker38 = createMarker ( 2147.7985839844 , 2088.6733398438 , 10.098752975464 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker38 then
destroyElement ( marker38 )
marker39 = createMarker ( 2184.0961914063 , 2137.4448242188 , 10.070822715759 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker39 then
destroyElement ( marker39 )
marker40 = createMarker ( 2229.8078613281 , 2137.5969238281 , 10.09125995636 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker40 then
destroyElement ( marker40 )
marker41 = createMarker ( 2300.1047363281 , 2137.44140625 , 10.090913772583 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker41 then
destroyElement ( marker41 )
marker42 = createMarker ( 2346.6469726563 , 2115.576171875 , 10.083622932434 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker42 then
destroyElement ( marker42 )
marker43 = createMarker ( 2347.7106933594 , 2059.3569335938 , 10.092763900757 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker43 then
destroyElement ( marker43 )
marker44 = createMarker ( 2347.8193359375 , 1973.0020751953 , 10.278070449829 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker44 then
destroyElement ( marker44 )
marker45 = createMarker ( 2347.0546875 , 1936.3863525391 , 10.096214294434 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker45 then
destroyElement ( marker45 )
marker46 = createMarker ( 2303.9626464844 , 1894.2742919922 , 10.091844558716 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker46 then
destroyElement ( marker46 )
marker47 = createMarker ( 2248.6804199219 , 1894.1970214844 , 10.090696334839 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker47 then
destroyElement ( marker47 )
marker48 = createMarker ( 2196.7587890625 , 1894.4997558594 , 10.090870857239 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker48 then
destroyElement ( marker48 )
marker49 = createMarker ( 2149.6398925781 , 1956.6387939453 , 10.098266601563 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker49 then
destroyElement ( marker49 )
marker50 = createMarker ( 2149.5300292969 , 2096.6594238281 , 10.098547935486 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker50 then
destroyElement ( marker50 )
marker51 = createMarker ( 2134.7932128906 , 2132.0009765625 , 10.108583450317 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker51 then
destroyElement ( marker51 )
marker52 = createMarker ( 2127.5437011719 , 2101.2849121094 , 10.086023330688 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker52 then
destroyElement ( marker52 )
marker53 = createMarker ( 2127.1884765625 , 2053.8913574219 , 10.090987205505 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker53 then
destroyElement ( marker53 )
marker54 = createMarker ( 2126.634765625 , 1979.0346679688 , 10.098132133484 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker54 then
destroyElement ( marker54 )
marker55 = createMarker ( 2126.1567382813 , 1914.8686523438 , 10.090879440308 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker55 then
destroyElement ( marker55 )
marker56 = createMarker ( 2124.28515625 , 1861.7329101563 , 10.08208656311 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker56 then
destroyElement ( marker56 )
marker57 = createMarker ( 2106.5954589844 , 1827.3889160156 , 10.089022636414 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker57 then
destroyElement ( marker57 )
marker58 = createMarker ( 2085.291015625 , 1782.8315429688 , 10.09103012085 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker58 then
destroyElement ( marker58 )
marker59 = createMarker ( 2057.9992675781 , 1726.1013183594 , 10.091327667236 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker59 then
destroyElement ( marker59 )
marker60 = createMarker ( 2045.3697509766 , 1675.2406005859 , 10.090759277344 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker60 then
destroyElement ( marker60 )
marker61 = createMarker ( 2060.4370117188 , 1646.1423339844 , 10.092084884644 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker61 then
destroyElement ( marker61 )
marker62 = createMarker ( 2135.9377441406 , 1652.1175537109 , 10.116108894348 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker62 then
destroyElement ( marker62 )
marker63 = createMarker ( 2160.2075195313 , 1672.5941162109 , 10.143789291382 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
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 )
Wysłany: 2015-08-13, 16:13
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
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.
Wysłany: 2015-08-13, 16:16
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4330 dni Posty: 698
Piwa : 2080
a mozesz mi powiedziec jak ?
Wysłany: 2015-08-13, 16:34
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
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 skina .
policeSkins = { [ 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 ( player , seat , jacked )
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 si ? wy ? wietla ? gdy nie mamy skina
end
end
Wysłany: 2015-08-13, 16:43
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4330 dni Posty: 698
Piwa : 2080
Wysłany: 2015-08-13, 17:00
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
kategoriab = {[ id_pojazdu ] = true , [ id_pojazdu ] = true }
function start ( plr , seat )
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
Wysłany: 2015-08-13, 21:44
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4330 dni Posty: 698
Piwa : 2080
Wysłany: 2015-08-14, 09:05
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
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!
Tagi: prawko
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: