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

Wysłany: 2016-04-01, 16:52


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
Cze?c, co jest nie tak w tej mecie? W konsoli wywala mi errory z met?.

Kod:

<meta>
<info name="3dtekst" author"NBL" type="script" version"1.0.0" />
<config src="3d.lua" type="server"/>
<min_mta_version client="1.5.2" server="1.5.2" />
<meta>


[ Dodano: 2016-04-01, 16:52 ]
PS^^ jest to skrypt na napisy 3D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 16:55


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Jak robisz 3D Texty to raczej na po stronie Clienta.

Wi?c zmie? z "server" na "client"

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 16:58


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
od kilku chwil nie wy?wietla mi si? ju? nic o mecie tylko teraz pisze cos takiego:
Couldnt find resource 3d, Check is exists.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 16:59


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
No to w folderze nie masz pliku o nazwie 3d.lua

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:01


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:03


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Czekaj, czekaj , teraz zauwa?y?em ?e je?eli chcesz w??czy? skrypt to wpisujesz nazw? "3d" a twoja nazwa skryptu to "3dtekst" (nazwa skryptu to nazwa folderu w kt?rym si? znajduj? od niego pliki)

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:07


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
Nie rozumiem...
Aha i jeszcze musze doda? ?e w mtaserverconf mia?em dawniej nazw? 3d a teraz zmieni?em na 3dtekst ale i tak nie odczytuje mi skryptu i nadal jest ten error co wcze?niej.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:09


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
A wpisa?e? w konsoli refresh ?

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:27


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
"_Wicek_" napisał/a:

A wpisa?e? w konsoli refresh ?



Tak, nawet resetowa?em ca?y serwer.
Tu masz ca?y kod na 3d teksty, mo?e nim co? jest nie tak...

Kod:

local fonts = { [ "default" ] = true, [ "default-bold" ] = true,[ "clear" ] = true,[ "arial" ] = true,[ "sans" ] = true,
[ "pricedown" ] = true, [ "bankgothic" ] = true,[ "diploma" ] = true,[ "beckett" ] = true
};

function dxDraw3DText( text, x, y, z, scale, font, r, g, b, maxDistance )

assert( type( text ) == "string", "Bad argument @ dxDraw3DText" );
assert( type( x ) == "number", "Bad argument @ dxDraw3DText" );
assert( type( y ) == "number", "Bad argument @ dxDraw3DText" );
assert( type( z ) == "number", "Bad argument @ dxDraw3DText" );

if not scale or type( scale ) ~= "number" or scale <= 0 then
scale = 2
end
if not font or type( font ) ~= "string" or not fonts[ font ] then
font = "default"
end
if not r or type( r ) ~= "number" or r < 0 or r > 255 then
r = 255
end
if not g or type( g ) ~= "number" or g < 0 or g > 255 then
g = 255
end
if not b or type( b ) ~= "number" or b < 0 or b > 255 then
b = 255
end
if not maxDistance or type( maxDistance ) ~= "number" or maxDistance <= 1 then
maxDistance = 20
end
local textElement = createElement( "text" );

if textElement then

setElementData( textElement, "text", text );
setElementData( textElement, "x", x );
setElementData( textElement, "y", y );
setElementData( textElement, "z", z );
setElementData( textElement, "scale", scale );
setElementData( textElement, "font", font );
setElementData( textElement, "rgba", { r, g, b, 255 } );
setElementData( textElement, "maxDistance", maxDistance );

return textElement
end

return false
end

addEventHandler( "onClientRender", root,
function( )
local texts = getElementsByType( "text" );
if #texts > 0 then
local pX, pY, pZ = getElementPosition( localPlayer );
for i = 1, #texts do
local text = getElementData( texts[i], "text" );
local tX, tY, tZ = getElementData( texts[i], "x" ), getElementData( texts[i], "y" ), getElementData( texts[i], "z" );
local font = getElementData( texts[i], "font" );
local scale = getElementData( texts[i], "scale" );
local color = getElementData( texts[i], "rgba" );
local maxDistance = getElementData( texts[i], "maxDistance" );
if not text or not tX or not tY or not tZ then
return
end
if not font then font = "default" end
if not scale then scale = 2 end
if not color or type( color ) ~= "table" then
color = { 255, 255, 255, 255 };
end
if not maxDistance then maxDistance = 20 end
local distance = getDistanceBetweenPoints3D( pX, pY, pZ, tX, tY, tZ );
if distance <= maxDistance then
local x, y = getScreenFromWorldPosition( tX, tY, tZ );
if x and y then
dxDrawText( text, x, y, _, _, tocolor( color[1], color[2], color[3], color[4] ), scale, font, "center", "center" );
end
end
end
end
end
);
tekst = dxDraw3DText( "Tuning montuje tylko RCON!", -2317.04346 37.89745 35.34515,2,"default",255,255,255, 25)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:41


SWRS







Wiek: 30
Na forum: 3809 dni
Posty: 39

Piwa: 1

Respekt: 50

Ostrzeżeń: 60%
<meta> 
<info name="3dtekst" author"NBL" type="script" version"1.0.0" /> 
<config src="3d.lua" type="client"/> 
<min_mta_version client="1.5.2" server="1.5.2" /> 
</meta>

To jest dobra meta, nie doda?e? na samym dole "/", zamiast </meta> mia?e? <meta>

Ostatnio zmieniony przez SWRS 2016-04-01, 17:46, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:46


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Od kiedy szukamy 'config' a nie 'script' b?d? 'file'? :)

<meta> 
<info name="3dtekst" author"NBL" type="script" version"1.0.0" /> 
<script src="3d.lua" type="client"/> 
<min_mta_version client="1.5.2" server="1.5.2" /> 
</meta>

Da?em stron? clienta w mecie, gdy? 3dtext'y raczej s? po clienta ;)

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:48


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
No ok.

Ale to nadal nie dzia?a ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:51


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Jakie? b??dy w debugu?

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 17:54


andrzej80

Amator Lua :D






Wiek: 29
Na forum: 3778 dni
Posty: 74
Nick w MP: andrzej80

Piwa: 1

Respekt: 50

<meta> 
<info name="3dtekst" author="NBL" type="script" version="1.0.0" /> 
<script src="3d.lua" type="client"/> 
<min_mta_version client="1.5.2" server="1.5.2" /> 
</meta>


Sprawd? to.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-01, 18:07


Basil.







Wiek: 24
Na forum: 3724 dni
Posty: 80
Nick w MP: njefjem



Respekt: 60

Ostrzeżeń: 100%
"andrzej80" napisał/a:

<meta> 
<info name="3dtekst" author="NBL" type="script" version="1.0.0" /> 
<script src="3d.lua" type="client"/> 
<min_mta_version client="1.5.2" server="1.5.2" /> 
</meta>


Sprawd? to.


Kod za?adowa? si? po zastosowaniu twojej mety, tylko teraz nie wiem dlaczego w og?le nie wida? tego napisu na mapie ;/

Postaw piwo autorowi tego posta
 

 
Tagi: jest :: nie :: tak :: tej :: mecie?
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