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: 4427 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(408261470294""false)
guiMemoSetReadOnly(memotrue)
guiSetVisible (memofalse )

tablica1 createMarker 1622.0021972656, -1861.984619140613"cylinder"22552550)

local player getLocalPlayer()

function tablica()
        dxDrawRectangle(398226490339tocolor(000233), false)
        dxDrawText("Tablica Ogloszen"445204842240tocolor(255255255255), 1.40"bankgothic""left""top"falsefalsetruefalsefalse)
end


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



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


Postaw piwo autorowi tego posta
 

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


kubak14







Wiek: 24
Na forum: 5205 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: 4427 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: 5205 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: 4427 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: 5201 dni
Posty: 230
Nick w MP: maciek00

Piwa: 3207

Respekt: 101,5
Respekt: 101,5

Spr?buj tak

s-side:


tablica1 createMarker 1622.0021972656, -1861.984619140613"cylinder"22552550)

function onMarker(hitElementdim)
 if getElementType(hitElement) == "player" then
 triggerClientEvent(hitElement), "showGUI"resourceRootfalsefalsefalse)
end
end
addEventHandler("onMarkerHit"tablica1onMarker)


c-side:
memo guiCreateMemo(408261470294""false)
guiMemoSetReadOnly(memotrue)
guiSetVisible (memofalse )

local player getLocalPlayer()

function tablica()
        dxDrawRectangle(398226490339tocolor(000233), false)
        dxDrawText("Tablica Ogloszen"445204842240tocolor(255255255255), 1.40"bankgothic""left""top"falsefalsetruefalsefalse)
end

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


Postaw piwo autorowi tego posta
 

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


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

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: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

addEventHandler "onClientMarkerHit"tablica1, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible (memotrue )
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: 4427 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: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

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: 5205 dni
Posty: 119
Nick w MP: Heavy

Piwa: 149

Respekt: 45,8

Ostrzeżeń: 20%
Ca?y kod:
memo guiCreateMemo(408261470294""false)
guiMemoSetReadOnly(memotrue)
guiSetVisible (memofalse )

tablica1 createMarker 1622.0021972656, -1861.984619140613"cylinder"22552550)

local player getLocalPlayer()

function tablica()
        dxDrawRectangle(398226490339tocolor(000233), false)
        dxDrawText("Tablica Ogloszen"445204842240tocolor(255255255255), 1.40"bankgothic""left""top"falsefalsetruefalsefalse)
end


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

addEventHandler "onClientMarkerLeave"tablica1, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible (memofalse )
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 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