Wysłany: 2015-08-03, 21:35
HypE
Wiek: 27 Na forum: 3958 dni Posty: 21
Nick w MP: HypE
Witam.
Chcia?bym was prosi? o pomoc w skrypcie kt?ry teleportuje graczy i samochody je?li gracz jest w odpowiedniej grupie acl.
I gdy np jaki? gracz z innej grupy wjedzie pojazdem w marker, to ?eby go nie teleportowa?o.
Z g?ry dzi?kuj? za pomoc i stawiam [/quote]
Wysłany: 2015-08-03, 22:03
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
marker = createMarker ( x , y , z , "cylinder" , 5.0 , 255 , 0 , 0 , 150 )
function x ( he , md )
if getElementType ( he ) ~= "player" then return end
auto = getPedOccupiedVehicle ( he )
acc = getPlayerAccount ( he )
accName = getAccountName ( acc )
if auto then
if isObjectInACLGroup ( "user" .. accName , aclGetGroup ( "jaka_grupa_uzupelnij" )) then
setElementPosition ( auto , x , y , z )
setElementInterior ( auto , i )
setElementDimension ( auto , d )
warpPedIntoVehicle ( he , auto )
else
outputChatBox ( "Cos tam" , he )
end
end
end
addEventHandler ( "onMarkerHit" , marker , x )
Uzupelnij i daj znac, w razie bledow w /debugscript 3 napisz je tutaj od razu
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
Wysłany: 2015-08-03, 22:24
HypE
Wiek: 27 Na forum: 3958 dni Posty: 21
Nick w MP: HypE
Jutro sprawdz? bo teraz nie mam zbytnio jak ; )
A wyt?umaczy? by? mi co oznacza he i md ? ^^
Wysłany: 2015-08-03, 22:27
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
Jasne :
he - hitElement czyli co wesz?o lub kto wszed? w marker.
md - matchingDimension : czy HE, czyli ta osoba ktora weszla w marker jest w tym samym dimensonie co marker, czy jako? to tak by?o xd
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
Wysłany: 2015-08-03, 22:55
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
auto = getPedOccupiedVehicle ( he )
Jak wejdzie gracz bez auta, to wywali b??d ^
addEventHandler ( "onMarkerHit" , root , function( el )
if getElementType ( el ) == "player" then
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "nazwa_grupy" )) then
local veh = getPedOccupiedVehicle ( el )
if veh then
removePedFromVehicle ( el , veh )
setElementPosition ( veh , x , y , z )
setElementDimension ( veh , dimension )
setElementInterior ( veh , interior )
setElementPosition ( el , x , y , z + 1 )
setElementDimension ( el , dimension )
setElementInterior ( el , interior )
warpPedIntoVehicle ( el , veh )
else
setElementPosition ( el , x , y , z )
setElementDimension ( el , dimension )
setElementInterior ( el , interior )
end
end
end )
Wysłany: 2015-08-04, 01:04
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Tostuch , nie trzeba ustawia? osobno pozycji dla gracza i pojazdu. Wystarczy dla pojazdu, gracz zostanie automatycznie teleportowany
Tagi: marker
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: