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

Wysłany: 2014-05-24, 17:15


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
Witam, z tej strony maxerxxl, mam pewien problem ot?? z interiorem, zrobi?em sobie funkcj? kt?ra po wej?ciu na marker wywo?uje funkcje tepaj?c mnie do interioru, okej, przetereportowuje mnie ale jedna wada, ja widz? siebie a gracz widzi tylko m?j nick tak jakby by?o zastosowane ALPHA, okej, w funkcji MarkerHIT da?em: setElementAlpha ( hitPlayer, 255 ) my?la?em ?e to pomo?e ale si? myli?em.

Gracz widzi tylko m?j nick, to samo ja widz? jego nick.
Ja siebie widz? ale innych nie tylko same nicki, oni te? maj? to samo.

Kod:


function MarkerHit(hitPlayer, matchingDimension)
if hitPlayer == localPlayer then
if source == urzadfc then

setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )

end
end
end
addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:16


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Interior jest domy?lny czy tworzony r?cznie ?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:17


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
domy?lny

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:18


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Spr?buj wpisa? inne ID interioru i sprawd? czy problem nadal wyst?puje. Je?li nie, zmienimy poprzedni kod.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:26


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
problem w ka?dym interiorze wyst?puje, jak ja przenosz? si? przez panel admina (P) to ka?dy siebie widzi, nie wiem czym jest problem.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:28


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Poniewa? zrobione jest to na client-side. U?yj kodu na s-side.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:39


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
dobra, zmieni?em przez met? na server.
ale co musz? zmieni? w kodzie ?eby dzia?a?o na server bo jak wchodz? w marker nic si? nie dzieje.
Kod:

urzadfc = createMarker(-207.67, 1119.24, 21.00, 'arrow', 1, 255, 255, 0, 150)

-- Wchodz?? w marker uruchamiamy funkcj?
function MarkerHit(hitPlayer, matchingDimension)
if hitPlayer == localPlayer then
if source == urzadfc then

setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )

end
end
end
addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:40


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Kod:


urzadfc = createMarker(-207.67, 1119.24, 21.00, 'arrow', 1, 255, 255, 0, 150)

-- Wchodz?? w marker uruchamiamy funkcj?
function MarkerHit(hitPlayer, matchingDimension)
if source == urzadfc then

setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )
end


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:46


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
chyba nie doda?e? ca?ego kodu.
po dodaniu twojego kodu nic si? nie zmieni?o.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:47


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Kod:

urzadfc = createMarker(-207.67, 1119.24, 21.00, 'arrow', 1, 255, 255, 0, 150)

-- Wchodz?? w marker uruchamiamy funkcj?
function MarkerHit(hitPlayer, matchingDimension)
if source == urzadfc then

setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )
end
end


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:53


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
nadal na nic nie reaguje.
Kod:

urzadfc = createMarker(-207.67, 1119.24, 21.00, 'arrow', 1, 255, 255, 0, 150)

-- Wchodz?? w marker uruchamiamy funkcj?
function MarkerHit(hitPlayer, matchingDimension)
if source == urzadfc then

setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )
end
end
addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:54


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Db3 sprawd?

[ Dodano: 2014-05-24, 17:54 ]
Ah !

addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit)

na

addEventHandler("onMarkerHit", getRootElement(), MarkerHit)

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 17:57


maxerxxl







Wiek: 30
Na forum: 5067 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
oo dzi?kuje dzia?a.
temat do zamkni?cia.

[ Dodano: 2014-05-24, 18:03 ]
Edit@
Mo?esz panmaszyna doda? setElementInterior? z g?ry dzi?kuje.
Kod:

urzadfc = createMarker(-207.67, 1119.24, 21.00, 'arrow', 1, 255, 255, 0, 150)
urzadwfc = createMarker(1494.49, 1304.17, 1093.29, 'arrow', 1, 255, 255, 0)

-- Wchodz?? w marker uruchamiamy funkcj?
function MarkerHit(hitPlayer, matchingDimension)
if source == urzadfc then
setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )
end
end
addEventHandler("onMarkerHit", getRootElement(), MarkerHit)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 18:04


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Kod:

urzadfc = createMarker(-207.67, 1119.24, 21.00, 'arrow', 1, 255, 255, 0, 150)
urzadwfc = createMarker(1494.49, 1304.17, 1093.29, 'arrow', 1, 255, 255, 0)
setElementInterior ( urzadwfc, 3 )

-- Wchodz?? w marker uruchamiamy funkcj?
function MarkerHit(hitPlayer, matchingDimension)
if source == urzadfc then
setElementAlpha ( hitPlayer, 255 )
setElementPosition ( hitPlayer, 1494.325195, 1304.942871, 1093.289062 )
setElementInterior ( hitPlayer, 3 )
end
end
addEventHandler("onMarkerHit", getRootElement(), MarkerHit)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-24, 19:01


monio







Wiek: 30
Na forum: 4887 dni
Posty: 319
Nick w MP: Monio99

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

Kolego mam dla Ciebie lepsza wersje:

to daj do serwer-side


addEvent("setElementInt",true)
addEventHandler("setElementInt",root,function(element,interior)
setElementInterior(element,3)
end
)

addEvent("setElementInt1",true)
addEventHandler("setElementInt1",root,function(element,interior)
setElementInterior(element,0)
end
)


a to do clienta:



wyjscie createPickup (1494.491304.171093.29313180)
wejscie createPickup (-207.671119.2421.00313180)
setElementInterior (wyjscie3)


function tp hitElementmatchingDimension )
if hitElement == getLocalPlayer() then 
fadeCamera(false,2,0,0,0)
setTimer(fadeCamera,2000,1,true)
setElementFrozen(hitElement,true)
setTimer(setElementFrozen,4000,1,hitElement,false)
setTimer(setElementPosition,2000,1hitElement1494.3251951304.9428711093.289062)
setTimer(triggerServerEvent,2000,1,"setElementInt"rootgetLocalPlayer(), int )
end
end
addEventHandler"onClientPickupHit"wejscietp )


function odtp hitElementmatchingDimension )
if hitElement == getLocalPlayer() then 
fadeCamera(false,2,0,0,0)
setTimer(fadeCamera,2000,1,true)
setElementFrozen(hitElement,true)
setTimer(setElementFrozen,4000,1,hitElement,false)
setTimer(setElementPosition,2000,1hitElement1494.3251951304.9428711093.289062)
setTimer(triggerServerEvent,2000,1,"setElementInt1"rootgetLocalPlayer(), int )
end
end
addEventHandler"onClientPickupHit"wyjscieodtp )


Ostatnio zmieniony przez monio 2014-05-24, 19:04, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Tagi: problem :: interiorem
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Problem z Interiorem 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