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

Wysłany: 2015-07-13, 14:02


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

Witam chcia?bym aby tepa?o gracza w dane miejsce a pozycje markera i gdzie ma tepac gracza odczytywa?o z tabeli. Pr?bowa?em na r?zne sposobny ale sobie nie poradzi?em. Kod:


local markery={
--x,y,z markeradimension markerainterior markerax,y,z,rz pozycja i rotacja tepnietego graczadimension tepnietego graczainterior tepnietego gracza
{1486.92749, -1740.1179213.54688+0.5,0,21494.25403, -1740.1887213.54688,00,1}
}

for i,v in ipairs(markery) do
        markery[i]=createMarker(v[1],v[2],v[3], "arrow",1)
        setElementInterior(markery[i], v[4])
        setElementDimension(markery[i], v[5])
    end


Co z tym zrobic aby odczyta?o w jaki marker wszed? gracz i tepne?o w podan? pozycje? Za pomoc stawiam :arrow: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 14:14


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

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

pos = {
{xyzintdimx2y2z2},
}

for kv in ipairs(pos) do
marker createMarker(v[1], v[2], v[3], "arrow"1.025500130)
setElementInterior(markerv[4])
setElementDimension(markerv[5])

function tp(hemd)
if he ~= localPlayer then return end
if not md then return end
setElementPosition(hev[6], v[7], v[8])
end
addEventHandler("onClientMarkerHit"roottp)

sprobuj tak



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
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 14:39


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

Dzi?a tylko wtedy gdy jest stworzy jeden marker gdy stworzy sie drugi(doda w tabeli) to tepa z obu do tego samego miejsca.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 15:06


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

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

a zamie? root na marker

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
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 15:11


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

Teraz wgl nie tepa.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 15:15


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

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

pos = {
{xyzintdimx2y2z2},
}

for kv in ipairs(pos) do
v.marker createMarker(v[1], v[2], v[3], "arrow"1.025500130)
setElementInterior(markerv[4])
setElementDimension(markerv[5])

function tp(hemd)
if he ~= localPlayer then return end
if not md then return end
setElementPosition(hev[6], v[7], v[8])
end
addEventHandler("onClientMarkerHit"roottp)





SProbuj teraz

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
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 15:22


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

Zn?w tepa w te same miejsca.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 15:48


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

piotr172, dajesz tu skrawek wyci?tego kodu, clienta z mojego serwera(.actionGaming).

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 15:56


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

"Maximerr" napisał/a:

piotr172, dajesz tu skrawek wyci?tego kodu, clienta z mojego serwera(.actionGaming).


Ja daje? Przecie? ten kod co ja da?em sam napisa?em, ka?dy takie cos mo?e napisa?. Na pewno to by?o do mnie? Ja nawet nie gra?em na tym serwerze.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 16:23


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

piotr172, @OFFTopic, hm, mo?e Ci? pomyli?em - przepraszam, po prostu u?ytkownik o podobnym nicku(Piotreg czy tam Piotrq) podkrada? mi strony clienta z serwera, przepraszam r?wnie? za offtopic.

[ Dodano: 2015-07-13, 16:26 ]
piotr172, @Topic,
pos = {
{xyzintdimx2y2z2},
}

for _v in ipairs(pos) do
marker createMarker(v[1], v[2], v[3], "arrow"1.025500130)
setElementInterior(markerv[4])
setElementDimension(markerv[5])
setElementData marker"posX"v[6] )
setElementData marker"posY"v[7] )
setElementData marker"posZ"v[8] )
end

function tp(hemd)
if he ~= localPlayer then return end
if not md then return end
if getElementData source"posX" then
local x getElementData source"posX" )
local y getElementData source"posY" )
local z getElementData source"posZ" )

setElementPosition(hex,y,z)
end
end
addEventHandler("onClientMarkerHit"roottp)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 16:30


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

Spoko, nic si? nie sta?o. Dzi?ki za kod bo dzia?a. Do zamkni?cia.

Postaw piwo autorowi tego posta
 

 
Tagi: tepanie :: gracza
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