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

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

Respekt: 200
Respekt: 200Respekt: 200

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

Client
function markerygo source )
     marker1 createMarker ( -2021.4088134766, -72.410918945334.875679016113"checkpoint"3.025500100)  
end
addEvent"zdajemyprawkotrolololo"true )
addEventHandler"zdajemyprawkotrolololo",localPlayermarkerygo )

function MH1 (hitPlayermatchingDimension)
 if hitPlayer == localPlayer then
  if source == marker1 then
destroyElement marker1 )
 marker2 createMarker ( -2004.9360351563, -35.51214218139634.832458496094"checkpoint"3.025500100end
  if source == marker2 then 
destroyElement marker2 )
 marker3 createMarker ( -2004.000366210991.2375411987327.248010635376"checkpoint"3.025500100)
end
  if source == marker3 then 
destroyElement marker3 )
 marker4 createMarker ( -2003.7264404297214.2390136718827.242795944214"checkpoint"3.025500100)
end
  if source == marker4 then 
destroyElement marker4 )
 marker5 createMarker ( -2000.6069335938330.3007202148434.719341278076"checkpoint"3.025500100)
end
  if source == marker5 then 
destroyElement marker5 )
 marker6 createMarker ( -1920.765625339.814178466830.586807250977"checkpoint"3.025500100)
end
  if source == marker6 then 
destroyElement marker6 )
 marker7 createMarker ( -1866.798828125406.8217163085916.725440979004"checkpoint"3.025500100)
end
  if source == marker7 then 
destroyElement marker7 )
 marker8 createMarker ( -1800.0079345703357.1582641601616.719371795654"checkpoint"3.025500100)
end
  if source == marker8 then 
destroyElement marker8 )
 marker9 createMarker ( -1703.6826171875344.985198974616.7350516319275"checkpoint"3.025500100)
end
  if source == marker9 then 
destroyElement marker9 )
 marker10 createMarker ( -1563.9660644531493.769500732426.7350330352783"checkpoint"3.025500100)
end
  if source == marker10 then 
destroyElement marker10 )
 marker11 createMarker ( -1556.5087890625660.706787109386.7428574562073"checkpoint"3.025500100)
end
  if source == marker11 then 
destroyElement marker11 )
marker12 createMarker ( -1532.919921875822.047058105476.7428555488586"checkpoint"3.025500100)
end
  if source == marker12 then 
destroyElement marker12 )
marker13 createMarker ( -1619.5228271484853.808898925787.2483463287354"checkpoint"3.025500100)
end
  if source == marker13 then 
destroyElement marker13 )
marker14 createMarker ( -1758.0897216797851.7579345703124.438226699829"checkpoint"3.025500100)
end
  if source == marker14 then 
destroyElement marker14 )
marker15 createMarker ( -1883.5778808594852.8189086914134.711742401123"checkpoint"3.025500100)
end
  if source == marker15 then 
destroyElement marker15 )
marker16 createMarker ( -1999.1400146484884.2091674804745.000663757324"checkpoint"3.025500100)
end
  if source == marker16 then 
destroyElement marker16 )
marker17 createMarker ( -2001.12438964841035.058959960955.274143218994"checkpoint"3.025500100)
end
  if source == marker17 then 
destroyElement marker17 )
marker18 createMarker ( -2063.878906251079.191528320355.274101257324"checkpoint"3.025500100)
end
  if source == marker18 then 
destroyElement marker18 )
marker19 createMarker ( -2315.32714843751080.432617187555.281860351563"checkpoint"3.025500100)
end
  if source == marker19 then 
destroyElement marker19 )
marker20 createMarker ( -2377.68432617191053.201293945355.281955718994"checkpoint"3.025500100)
end
  if source == marker20 then 
destroyElement marker20 )
marker21 createMarker ( -2389.1862792969919.2697143554745.000663757324"checkpoint"3.025500100)
end
  if source == marker21 then 
destroyElement marker21 )
marker22 createMarker ( -2389.5632324219777.3750610351634.724433898926"checkpoint"3.025500100)
end
  if source == marker22 then 
destroyElement marker22 )
marker23 createMarker ( -2389.7578125639.6299438476634.702121734619"checkpoint"3.025500100)
end
  if source == marker23 then 
destroyElement marker23 )
marker24 createMarker ( -2370.4873046875494.164337158229.719303131104"checkpoint"3.025500100)
end
  if source == marker24 then 
destroyElement marker24 )
marker25 createMarker ( -2271.6120605469376.8250122070333.729957580566"checkpoint"3.025500100)
end
  if source == marker25 then 
destroyElement marker25 )
marker26 createMarker ( -2254.548828125223.6275024414134.867847442627"checkpoint"3.025500100)
end
  if source == marker26 then 
destroyElement marker26 )
marker27 createMarker ( -2256.810791015663.65774917602534.875648498535"checkpoint"3.025500100)
end
  if source == marker27 then 
destroyElement marker27 )
marker28 createMarker ( -2350.37695312549.4887695312534.869132995605"checkpoint"3.025500100)
end
  if source == marker28 then 
destroyElement marker28 )
marker29 createMarker ( -2373.8330078125, -56.27337646484434.87663269043"checkpoint"3.025500100)
end
  if source == marker29 then 
destroyElement marker29 )
marker30 createMarker ( -2372.1452636719, -168.2098083496134.87565612793"checkpoint"3.025500100)
end
  if source == marker30 then 
destroyElement marker30 )
marker31 createMarker ( -2222.2431640625, -191.8039093017634.916343688965"checkpoint"3.025500100)
end
  if source == marker31 then 
destroyElement marker31 )
marker32 createMarker ( -2169.8825683594, -176.039764404334.875709533691"checkpoint"3.025500100)
end
  if source == marker32 then 
destroyElement marker32 )
marker33 createMarker ( -2166.0402832031, -83.40489196777334.875679016113"checkpoint"3.025500100)
end
  if source == marker33 then 
destroyElement marker33 )
marker34 createMarker ( -2139.2216796875, -72.01444244384834.875701904297"checkpoint"3.025500100)
end
  if source == marker34 then 
destroyElement marker34 )
marker35 createMarker ( -2049.4025878906, -99.10968017578134.871997833252"checkpoint"3.025500100)
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 getpossource ) 
 local x,y,getElementPosition source )
   outputChatBox(""..x..", "..y..", "..z..""source255255255)
 end
 addCommandHandler("pozycja"getpos )

function sethpnpc ()
end
setTimersethpnpc1000,)
  local marker createMarker ( -2033.4279785156, -117.676437377931034.171875"cylinder"2.025500)
   setElementInterior marker3)
   function onhitsource ) 
      outputChatBox("Aby zaczac kurs prawa jazdy wpisz /kurs"source255255255)
end
addEventHandler"onMarkerHit"markeronhit)


function kurs(source)
 if isElementWithinMarker sourcemarker )
 then
local konto getPlayerAccount source )
if not getAccountData(konto,"prawojazdy" then
 setElementInterior source0)
auto createVehicle 589, -2043.4975585938, -98.26519775390635.330215454102000)
warpPlayerIntoVehicle sourceauto )  
 local instruktor2 =  createPed(1700,)
 warpPlayerIntoVehicle instruktor2auto)
toggleControl(source,"enter_exit",true) --blokada--
triggerClientEvent ("zdajemyprawkotrolololo"source )
else
   outputChatBox("Masz juz prawo jazdy."source255255255)
end
end
end
addCommandHandler("kurs"kurs)

function zdal ()
local nick getPlayerName source)
      outputChatBox("Gracz "..nick.." #ff0000zdal/a #ffffffegzamin na prawo jazdy ! #ff0000Gratulujemy !"all255255255true )
konto getPlayerAccount source )
setAccountData konto"prawojazdy"true )
end

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

function oblal ()
local nick getPlayerName source)

      outputChatBox("Gracz "..nick.." #ff0000oblal/a #ffffffegzamin na prawo jazdy ! #ff0000Przykro nam"all255255255true )
end

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

function zabierzauto ( )
local auto getPedOccupiedVehiclesource )
destroyElement auto )
end

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

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


Podpis
Modeler Corporation Sp. Z.O.O

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-07, 19:31


TheTroll

Pan Majster






Wiek: 38
Na forum: 4764 dni
Posty: 219
Nick w MP: TheTroll

Piwa: 1114

Respekt: 120
Respekt: 120

Zmie? to
toggleControl(source,"enter_exit",true)


na to
toggleControl(source,"enter_exit",false)


Postaw piwo autorowi tego posta
 

 
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

Respekt: 200
Respekt: 200Respekt: 200

Dzi?ki zapomina?em o tym :D 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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-07, 20:50


TheTroll

Pan Majster






Wiek: 38
Na forum: 4764 dni
Posty: 219
Nick w MP: TheTroll

Piwa: 1114

Respekt: 120
Respekt: 120

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

Postaw piwo autorowi tego posta
 

 
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

Respekt: 200
Respekt: 200Respekt: 200

Dzi?ki za wyja?ni? TheTroll, Do zamkni?cia

Podpis
Modeler Corporation Sp. Z.O.O

Postaw piwo autorowi tego posta
 

 
Tagi: togglecontrol :: nie :: dziala
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