Wysłany: 2015-08-07, 19:24
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
Witam mam o tuz taki problem bo chce da? blokad? wyj?cia z auta lecz co? mi to nie dzia?a nie wiem czemu, w DB3 ?adnych b??d?w.
Za pomoc daje
Client
function markerygo ( source )
marker1 = createMarker ( - 2021.4088134766 , - 72.4109189453 , 34.875679016113 , "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 ( - 2004.9360351563 , - 35.512142181396 , 34.832458496094 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker2 then
destroyElement ( marker2 )
marker3 = createMarker ( - 2004.0003662109 , 91.23754119873 , 27.248010635376 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker3 then
destroyElement ( marker3 )
marker4 = createMarker ( - 2003.7264404297 , 214.23901367188 , 27.242795944214 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker4 then
destroyElement ( marker4 )
marker5 = createMarker ( - 2000.6069335938 , 330.30072021484 , 34.719341278076 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker5 then
destroyElement ( marker5 )
marker6 = createMarker ( - 1920.765625 , 339.8141784668 , 30.586807250977 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker6 then
destroyElement ( marker6 )
marker7 = createMarker ( - 1866.798828125 , 406.82171630859 , 16.725440979004 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker7 then
destroyElement ( marker7 )
marker8 = createMarker ( - 1800.0079345703 , 357.15826416016 , 16.719371795654 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker8 then
destroyElement ( marker8 )
marker9 = createMarker ( - 1703.6826171875 , 344.98519897461 , 6.7350516319275 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker9 then
destroyElement ( marker9 )
marker10 = createMarker ( - 1563.9660644531 , 493.76950073242 , 6.7350330352783 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker10 then
destroyElement ( marker10 )
marker11 = createMarker ( - 1556.5087890625 , 660.70678710938 , 6.7428574562073 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker11 then
destroyElement ( marker11 )
marker12 = createMarker ( - 1532.919921875 , 822.04705810547 , 6.7428555488586 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker12 then
destroyElement ( marker12 )
marker13 = createMarker ( - 1619.5228271484 , 853.80889892578 , 7.2483463287354 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker13 then
destroyElement ( marker13 )
marker14 = createMarker ( - 1758.0897216797 , 851.75793457031 , 24.438226699829 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker14 then
destroyElement ( marker14 )
marker15 = createMarker ( - 1883.5778808594 , 852.81890869141 , 34.711742401123 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker15 then
destroyElement ( marker15 )
marker16 = createMarker ( - 1999.1400146484 , 884.20916748047 , 45.000663757324 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker16 then
destroyElement ( marker16 )
marker17 = createMarker ( - 2001.1243896484 , 1035.0589599609 , 55.274143218994 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker17 then
destroyElement ( marker17 )
marker18 = createMarker ( - 2063.87890625 , 1079.1915283203 , 55.274101257324 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker18 then
destroyElement ( marker18 )
marker19 = createMarker ( - 2315.3271484375 , 1080.4326171875 , 55.281860351563 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker19 then
destroyElement ( marker19 )
marker20 = createMarker ( - 2377.6843261719 , 1053.2012939453 , 55.281955718994 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker20 then
destroyElement ( marker20 )
marker21 = createMarker ( - 2389.1862792969 , 919.26971435547 , 45.000663757324 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker21 then
destroyElement ( marker21 )
marker22 = createMarker ( - 2389.5632324219 , 777.37506103516 , 34.724433898926 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker22 then
destroyElement ( marker22 )
marker23 = createMarker ( - 2389.7578125 , 639.62994384766 , 34.702121734619 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker23 then
destroyElement ( marker23 )
marker24 = createMarker ( - 2370.4873046875 , 494.1643371582 , 29.719303131104 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker24 then
destroyElement ( marker24 )
marker25 = createMarker ( - 2271.6120605469 , 376.82501220703 , 33.729957580566 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker25 then
destroyElement ( marker25 )
marker26 = createMarker ( - 2254.548828125 , 223.62750244141 , 34.867847442627 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker26 then
destroyElement ( marker26 )
marker27 = createMarker ( - 2256.8107910156 , 63.657749176025 , 34.875648498535 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker27 then
destroyElement ( marker27 )
marker28 = createMarker ( - 2350.376953125 , 49.48876953125 , 34.869132995605 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker28 then
destroyElement ( marker28 )
marker29 = createMarker ( - 2373.8330078125 , - 56.273376464844 , 34.87663269043 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker29 then
destroyElement ( marker29 )
marker30 = createMarker ( - 2372.1452636719 , - 168.20980834961 , 34.87565612793 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker30 then
destroyElement ( marker30 )
marker31 = createMarker ( - 2222.2431640625 , - 191.80390930176 , 34.916343688965 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker31 then
destroyElement ( marker31 )
marker32 = createMarker ( - 2169.8825683594 , - 176.0397644043 , 34.875709533691 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker32 then
destroyElement ( marker32 )
marker33 = createMarker ( - 2166.0402832031 , - 83.404891967773 , 34.875679016113 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker33 then
destroyElement ( marker33 )
marker34 = createMarker ( - 2139.2216796875 , - 72.014442443848 , 34.875701904297 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker34 then
destroyElement ( marker34 )
marker35 = createMarker ( - 2049.4025878906 , - 99.109680175781 , 34.871997833252 , "checkpoint" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker35 then
destroyElement ( marker35 )
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 )
Server
function getpos ( source )
local x , y , z = getElementPosition ( source )
outputChatBox ( "" .. x .. ", " .. y .. ", " .. z .. "" , source , 255 , 255 , 255 )
end
addCommandHandler ( "pozycja" , getpos )
function sethpnpc ()
end
setTimer ( sethpnpc , 1000 , 0 )
local marker = createMarker ( - 2033.4279785156 , - 117.67643737793 , 1034.171875 , "cylinder" , 2.0 , 255 , 0 , 0 )
setElementInterior ( marker , 3 )
function onhit ( source )
outputChatBox ( "Aby zaczac kurs prawa jazdy wpisz /kurs" , source , 255 , 255 , 255 )
end
addEventHandler ( "onMarkerHit" , marker , onhit )
function kurs ( source )
if isElementWithinMarker ( source , marker )
then
local konto = getPlayerAccount ( source )
if not getAccountData ( konto , "prawojazdy" ) then
setElementInterior ( source , 0 )
auto = createVehicle ( 589 , - 2043.4975585938 , - 98.265197753906 , 35.330215454102 , 0 , 0 , 0 )
warpPlayerIntoVehicle ( source , auto )
local instruktor2 = createPed ( 17 , 0 , 0 , 0 )
warpPlayerIntoVehicle ( instruktor2 , auto , 1 )
toggleControl ( source , "enter_exit" , true ) -- blokada --
triggerClientEvent ( "zdajemyprawkotrolololo" , source )
else
outputChatBox ( "Masz juz prawo jazdy." , source , 255 , 255 , 255 )
end
end
end
addCommandHandler ( "kurs" , kurs )
function zdal ()
local nick = getPlayerName ( source )
outputChatBox ( "Gracz " .. nick .. " #ff0000zdal/a #ffffffegzamin na prawo jazdy ! #ff0000Gratulujemy !" , all , 255 , 255 , 255 , true )
konto = getPlayerAccount ( source )
setAccountData ( konto , "prawojazdy" , true )
end
addEvent ( "prawko.zdal" , true )
addEventHandler ( "prawko.zdal" , root , zdal )
function oblal ()
local nick = getPlayerName ( source )
outputChatBox ( "Gracz " .. nick .. " #ff0000oblal/a #ffffffegzamin na prawo jazdy ! #ff0000Przykro nam" , all , 255 , 255 , 255 , true )
end
addEvent ( "prawko.oblal" , true )
addEventHandler ( "prawko.oblal" , root , oblal )
function zabierzauto ( )
local auto = getPedOccupiedVehicle ( source )
destroyElement ( auto )
end
addEvent ( "prawkoautosadasdas" , true )
addEventHandler ( "prawkoautosadasdas" , root , zabierzauto )
function sadasdsa ( source )
konto = getPlayerAccount ( source )
setAccountData ( konto , "prawojazdy" , false )
end
addCommandHandler ( "sadsavfd343" , sadasdsa )
Podpis
Modeler Corporation Sp. Z.O.O
Wysłany: 2015-08-07, 19:31
TheTroll
Pan Majster
Wiek: 38 Na forum: 4764 dni Posty: 219
Nick w MP: TheTroll
Piwa : 1114
Zmie? to
toggleControl ( source , "enter_exit" , true )
na to
toggleControl ( source , "enter_exit" , false )
Wysłany: 2015-08-07, 20:19
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
Dzi?ki zapomina?em o tym aha tak ma?a pro?ba jak zrobi? jak si? zda prawo jazdy to usuwa to toggleControl(source,"enter_exit",false) bo jak mam zrespiony pojazd to nie mog? do niego wej??
Podpis
Modeler Corporation Sp. Z.O.O
Wysłany: 2015-08-07, 20:50
TheTroll
Pan Majster
Wiek: 38 Na forum: 4764 dni Posty: 219
Nick w MP: TheTroll
Piwa : 1114
toggleControl(source,"enter_exit",false) Blokuje wysiadanie/ wsiadanie do pojazd?w
toggleControl(source,"enter_exit",true) Powoduje ?e mo?emy normalnie wsiada? do pojazd?w
Wysłany: 2015-08-07, 21:07
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
Dzi?ki za wyja?ni? TheTroll , Do zamkni?cia
Podpis
Modeler Corporation Sp. Z.O.O
Tagi: togglecontrol :: nie :: dziala
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: