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

Wysłany: 2014-07-10, 23:00


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

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

Witam, pisz? sobi? skrypt tablicy og?osze?. Ale po wej?ciu w marker jednego z graczy, wszystkim wy?wietla si? tablica. Totalnie nie wiem oco chodzi. Za pomoc, naturalnie :piwo:

Kod klient:
memo = guiCreateMemo(408, 261, 470, 294, "", false)
guiMemoSetReadOnly(memo, true)
guiSetVisible (memo, false )

tablica1 = createMarker ( 1622.0021972656, -1861.9846191406, 13, "cylinder", 2, 255, 255, 0, 0 )

local player = getLocalPlayer()

function tablica()
        dxDrawRectangle(398, 226, 490, 339, tocolor(0, 0, 0, 233), false)
        dxDrawText("Tablica Ogloszen", 445, 204, 842, 240, tocolor(255, 255, 255, 255), 1.40, "bankgothic", "left", "top", false, false, true, false, false)
end


addEventHandler ( "onClientMarkerHit", tablica1, function()
guiSetVisible (memo, true )
addEventHandler ("onClientRender", getRootElement(), tablica)
end)



addEventHandler ( "onPlayerMarkerLeave", tablica1, function()
guiSetVisible (memo, false )
removeEventHandler ("onClientRender", getRootElement(), tablica)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-10, 23:12


kubak14







Wiek: 24
Na forum: 5346 dni
Posty: 119
Nick w MP: Heavy

Piwa: 149

Respekt: 45,8

Ostrzeżeń: 20%
Moge wiedziec gdzie jest ten marker ? Chce zobaczyc co i jak bo CHYBA wiem gdzie jest b??d. (nie chce mi sie teraz tego all przestawiac itp)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-10, 23:20


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

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

Przy stacji kolejowej w los santos, tam przy komisariacie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-10, 23:25


kubak14







Wiek: 24
Na forum: 5346 dni
Posty: 119
Nick w MP: Heavy

Piwa: 149

Respekt: 45,8

Ostrzeżeń: 20%
Emm... Nie widze go na stacji ls, podaj dokladniej, za drzewem przy drzwiach glownych?

[ Dodano: 2014-07-10, 23:26 ]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-10, 23:34


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

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

Przy, przy, przy! Umiesz czyta? ze zrozumieniem? Poza tym, prze??? sobie kordy na naprzyk?ad stacj?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-10, 23:43


maciek3286

LUA Developer






Wiek: 26
Na forum: 5342 dni
Posty: 230
Nick w MP: maciek00

Piwa: 3211

Respekt: 101,5
Respekt: 101,5

Spr?buj tak

s-side:


tablica1 = createMarker ( 1622.0021972656, -1861.9846191406, 13, "cylinder", 2, 255, 255, 0, 0 )

function onMarker(hitElement, dim)
 if getElementType(hitElement) == "player" then
 triggerClientEvent(hitElement), "showGUI", resourceRoot, false, false, false)
end
end
addEventHandler("onMarkerHit", tablica1, onMarker)


c-side:
memo = guiCreateMemo(408, 261, 470, 294, "", false)
guiMemoSetReadOnly(memo, true)
guiSetVisible (memo, false )

local player = getLocalPlayer()

function tablica()
        dxDrawRectangle(398, 226, 490, 339, tocolor(0, 0, 0, 233), false)
        dxDrawText("Tablica Ogloszen", 445, 204, 842, 240, tocolor(255, 255, 255, 255), 1.40, "bankgothic", "left", "top", false, false, true, false, false)
end

addEvent("showGUI", true)
addEventHandler("showGUI", getRootElement(), 
function(a,b,c)
guiSetVisible(memo, true)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-11, 00:27


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

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

maciek3286, Nie dzia?a. Nie pokazuje si? marker i w db3 b??d:
WARNING: Loading script failed: [serv]/tablice/tablica1_s.lua:5: unexpected symbol near ','

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-11, 01:03


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

addEventHandler ( "onClientMarkerHit", tablica1, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible (memo, true )
addEventHandler ("onClientRender", getRootElement(), tablica)
end)


Podpis

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

 
Wysłany: 2014-07-11, 01:19


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

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

PanMaszyna, Dzia?a :piwo: dal ciebi?. A jak teraz, aby po wyj?ciu z markera wy??czy? si? ten panel?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-11, 01:34


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

event onMarkerLeave/ onClientMarkerLeave

Podpis

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

 
Wysłany: 2014-07-11, 01:46


kubak14







Wiek: 24
Na forum: 5346 dni
Posty: 119
Nick w MP: Heavy

Piwa: 149

Respekt: 45,8

Ostrzeżeń: 20%
Ca?y kod:
memo = guiCreateMemo(408, 261, 470, 294, "", false)
guiMemoSetReadOnly(memo, true)
guiSetVisible (memo, false )

tablica1 = createMarker ( 1622.0021972656, -1861.9846191406, 13, "cylinder", 2, 255, 255, 0, 0 )

local player = getLocalPlayer()

function tablica()
        dxDrawRectangle(398, 226, 490, 339, tocolor(0, 0, 0, 233), false)
        dxDrawText("Tablica Ogloszen", 445, 204, 842, 240, tocolor(255, 255, 255, 255), 1.40, "bankgothic", "left", "top", false, false, true, false, false)
end


addEventHandler ( "onClientMarkerHit", tablica1, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible (memo, true )
addEventHandler ("onClientRender", getRootElement(), tablica)
end)

addEventHandler ( "onClientMarkerLeave", tablica1, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible (memo, false )
removeEventHandler ("onClientRender", getRootElement(), tablica)
end)


Postaw piwo autorowi tego posta
 

 
Tagi: tablice :: ogłoszeń
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Tablice Ogłoszeń 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