Wysłany: 2014-09-27, 15:24
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Witam. Stworzy?em sobie panel interakcji. Wchodz?c w gr?, odpalaj?c skrypt - wywala same errory. Oco chodzi?
Za pomoc piwsko.
bindKey ( "1" , "down" , function()
if guiGetVisible ( papieros ) == false then
guiSetVisible ( papieros , true )
guiSetVisible ( machaj , true )
guiSetVisible ( sikaj , true )
guiSetVisible ( lez , true )
guiSetVisible ( rece , true )
guiSetVisible ( wal , true )
guiSetVisible ( pij , true )
guiSetVisible ( gangsta , true )
guiSetVisible ( cop , true )
guiSetVisible ( infolist , true )
showCursor ( true )
addEventHandler ( "onClientRender" , root , paneltlo )
else
guiSetVisible ( papieros , false )
guiSetVisible ( machaj , false )
guiSetVisible ( sikaj , false )
guiSetVisible ( lez , false )
guiSetVisible ( rece , false )
guiSetVisible ( wal , false )
guiSetVisible ( pij , false )
guiSetVisible ( gangsta , false )
guiSetVisible ( cop , false )
guiSetVisible ( infolist , true )
showCursor ( false )
removeEventHandler ( "onClientRender" , root , paneltlo )
end
end )
papieros = guiCreateButton ( 383 , 194 , 151 , 40 , "ZAPAL PAPIEROSA" , false )
guiSetProperty ( papieros , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
machaj = guiCreateButton ( 567 , 194 , 151 , 40 , "POMACHAJ" , false )
guiSetProperty ( machaj , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
sikaj = guiCreateButton ( 749 , 194 , 151 , 40 , "SIKAJ" , false )
guiSetProperty ( sikaj , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
lez = guiCreateButton ( 383 , 251 , 151 , 40 , "LE?" , false )
guiSetProperty ( lez , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
rece = guiCreateButton ( 567 , 251 , 151 , 40 , "R?CE" , false )
guiSetProperty ( rece , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
wal = guiCreateButton ( 749 , 251 , 151 , 40 , "WAL KONIA" , false )
guiSetProperty ( wal , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
pij = guiCreateButton ( 383 , 308 , 151 , 40 , "PIJ" , false )
guiSetProperty ( pij , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
gangsta = guiCreateButton ( 567 , 308 , 151 , 40 , "GANGSTA" , false )
guiSetProperty ( gangsta , "NormalTextColour" , "DEFFFFFF" )
---------------------------------------------------------
cop = guiCreateLabel ( 572 , 577 , 146 , 16 , "cop..." , false )
---------------------------------------------------------
guiSetVisible ( papieros , false )
guiSetVisible ( machaj , false )
guiSetVisible ( sikaj , false )
guiSetVisible ( lez , false )
guiSetVisible ( rece , false )
guiSetVisible ( wal , false )
guiSetVisible ( pij , false )
guiSetVisible ( gangsta , false )
guiSetVisible ( cop , false )
guiSetVisible ( infolist , false )
---------------------------------------------------------
local nick = getPlayerName ( getLocalPlayer ())
local kasa = getPlayerMoney ( getLocalPlayer ())
local serial = getPlayerSerial ( getLocalPlayer ())
local ping = getPlayerPing ( getLocalPlayer ())
local frakcja = getPlayerTeam ( getLocalPlayer ())
infolist = guiCreateGridList ( 750 , 308 , 150 , 259 )
guiGridListAddColumn ( infolist , "INFORMACJE" , 0.9 )
for i = 1 , 5 do
guiGridListAddRow ( infolist )
end
guiGridListSetItemText ( infolist , 0 , 1 , "PING: " .. ping .. "" , false , false )
guiGridListSetItemText ( infolist , 1 , 1 , "NICK: " .. nick .. "" , false , false )
guiGridListSetItemText ( infolist , 2 , 1 , "KASA: " .. kasa .. "" , false , false )
guiGridListSetItemText ( infolist , 3 , 1 , "IP: " .. serial .. "" , false , false )
guiGridListSetItemText ( infolist , 4 , 1 , "FRAKCJA: " .. frakcja .. "" , false , false )
---------------------------------------------------------
function paneltlo ()
dxDrawRectangle ( 373 , 124 , 537 , 52 , tocolor ( 0 , 0 , 0 , 222 ), false )
dxDrawText ( "Menu Interakcji" , 470 , 131 , 807 , 167 , tocolor ( 0 , 0 , 0 , 255 ), 1.30 , "bankgothic" , "left" , "top" , false , false , true , false , false )
dxDrawText ( "Menu Interakcji" , 470 , 129 , 807 , 165 , tocolor ( 0 , 0 , 0 , 255 ), 1.30 , "bankgothic" , "left" , "top" , false , false , true , false , false )
dxDrawText ( "Menu Interakcji" , 468 , 131 , 805 , 167 , tocolor ( 0 , 0 , 0 , 255 ), 1.30 , "bankgothic" , "left" , "top" , false , false , true , false , false )
dxDrawText ( "Menu Interakcji" , 468 , 129 , 805 , 165 , tocolor ( 0 , 0 , 0 , 255 ), 1.30 , "bankgothic" , "left" , "top" , false , false , true , false , false )
dxDrawText ( "Menu Interakcji" , 469 , 130 , 806 , 166 , tocolor ( 255 , 255 , 255 , 255 ), 1.30 , "bankgothic" , "left" , "top" , false , false , true , false , false )
dxDrawRectangle ( 373 , 184 , 537 , 419 , tocolor ( 0 , 0 , 0 , 222 ), false )
end
Wysłany: 2014-09-27, 16:41
PolskiSebek12
Programista
Wiek: 28 Na forum: 4346 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
skrypt pr?buje pokaza? tobie gui np: papieros ale nie mo?e go znale??
Wysłany: 2014-09-27, 17:01
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Co ty w og?le wygadujesz..
[ Dodano : 2014-09-27, 17:07 ]
Wywala mi same Bad Argumenty przy hendlerze paneltlo, i gridzie. A reszte normalnie wida?
Wysłany: 2014-09-27, 17:30
PolskiSebek12
Programista
Wiek: 28 Na forum: 4346 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
"guiSetVisible ( papieros,true)" gdzie jest element o nazwie papieros ?
spr?buj zrobi? co? z czym? czego nie masz
Wysłany: 2014-09-27, 17:34
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Tu.
papieros = guiCreateButton ( 383 , 194 , 151 , 40 , "ZAPAL PAPIEROSA" , false )
guiSetProperty ( papieros , "NormalTextColour" , "DEFFFFFF" )
Zjed? na d??.
Wysłany: 2014-09-27, 17:56
PolskiSebek12
Programista
Wiek: 28 Na forum: 4346 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
mta laduje skrypty od gory do dolu:
Kod: A = "OK"
outputChatBox(A)
Zadziala
Kod: outputChatBox(A)
A = "OK"
Niezadziala
to samo tyczy si? przy ?adowaniu skrypt?w, je?eli masz plik A.lua z zawarto?ci?: A = "OK" i plik B.lua z zawaro?ci? outputChatBox(A), to najpierw plik A musi si? za?adowa? a potem plik B
Wysłany: 2014-09-27, 17:57
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
TO JEST JEDEN SKRYPT.
[ Dodano : 2014-09-27, 18:00 ]
Wszystko ju? mam. Dzi?ki.
Wysłany: 2014-09-27, 18:00
PolskiSebek12
Programista
Wiek: 28 Na forum: 4346 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
tw?j skrypt dzia?a tak:
w??cz gui A -- gui o nazwie A nie istnieje
stw?rz gui A -- tworzy gui o nazwie A
JAKI TO MA SENS ???
createButton daj na g?r? skryptu
Wysłany: 2014-09-27, 18:02
TheTroll
Pan Majster
Wiek: 38 Na forum: 4764 dni Posty: 219
Nick w MP: TheTroll
Piwa : 1114
W tym kodzie dzia?a wszystko na sto procent
Kod: bindKey ( "1", "down", function()
if guiGetVisible(papieros) == false then
guiSetVisible ( papieros,true)
guiSetVisible ( machaj,true)
guiSetVisible ( sikaj,true)
guiSetVisible ( lez,true)
guiSetVisible ( rece,true)
guiSetVisible ( wal,true)
guiSetVisible ( pij,true)
guiSetVisible ( gangsta,true)
guiSetVisible ( cop,true)
guiSetVisible ( infolist,true)
showCursor ( true )
addEventHandler ( "onClientRender", getRootElement(), paneltlo )
else
guiSetVisible ( papieros,false)
guiSetVisible ( machaj,false)
guiSetVisible ( sikaj,false)
guiSetVisible ( lez,false)
guiSetVisible ( rece,false)
guiSetVisible ( wal,false)
guiSetVisible ( pij,false)
guiSetVisible ( gangsta,false)
guiSetVisible ( cop,false)
guiSetVisible ( infolist,false)
showCursor (false)
removeEventHandler ( "onClientRender", getRootElement(), paneltlo )
end
end)
papieros = guiCreateButton(383, 194, 151, 40, "ZAPAL PAPIEROSA", false)
guiSetProperty(papieros, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
machaj = guiCreateButton(567, 194, 151, 40, "POMACHAJ", false)
guiSetProperty(machaj, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
sikaj = guiCreateButton(749, 194, 151, 40, "SIKAJ", false)
guiSetProperty(sikaj, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
lez = guiCreateButton(383, 251, 151, 40, "LE?", false)
guiSetProperty(lez, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
rece = guiCreateButton(567, 251, 151, 40, "R?CE", false)
guiSetProperty(rece, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
wal = guiCreateButton(749, 251, 151, 40, "WAL KONIA", false)
guiSetProperty(wal, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
pij = guiCreateButton(383, 308, 151, 40, "PIJ", false)
guiSetProperty(pij, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
gangsta = guiCreateButton(567, 308, 151, 40, "GANGSTA", false)
guiSetProperty(gangsta, "NormalTextColour", "DEFFFFFF")
---------------------------------------------------------
cop = guiCreateLabel(572, 577, 146, 16, "cop...", false)
---------------------------------------------------------
infolist = guiCreateGridList(750, 308, 150, 259, false)
guiGridListAddColumn(infolist, "INFORMACJE", 0.9)
for i = 1, 5 do
guiGridListAddRow(infolist)
end
--------------------------------------------------------
guiSetVisible ( papieros,false)
guiSetVisible ( machaj,false)
guiSetVisible ( sikaj,false)
guiSetVisible ( lez,false)
guiSetVisible ( rece,false)
guiSetVisible ( wal,false)
guiSetVisible ( pij,false)
guiSetVisible ( gangsta,false)
guiSetVisible ( cop,false)
guiSetVisible ( infolist,false)
---------------------------------------------------------
local nick = getPlayerName(getLocalPlayer())
local kasa = getPlayerMoney(getLocalPlayer())
local serial = getPlayerSerial(getLocalPlayer())
local ping = getPlayerPing(getLocalPlayer())
local frakcja = getPlayerTeam(getLocalPlayer())
guiGridListSetItemText(infolist, 0, 1, "PING: "..ping.."", false, false)
guiGridListSetItemText(infolist, 1, 1, "NICK: "..nick.."", false, false)
guiGridListSetItemText(infolist, 2, 1, "KASA: "..kasa.."", false, false)
guiGridListSetItemText(infolist, 3, 1, "IP: "..serial.."", false, false)
guiGridListSetItemText(infolist, 4, 1, "FRAKCJA: "..getTeamName(frakcja).."", false, false)
---------------------------------------------------------
function paneltlo()
dxDrawRectangle(373, 124, 537, 52, tocolor(0, 0, 0, 222), false)
dxDrawText("Menu Interakcji", 470, 131, 807, 167, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("Menu Interakcji", 470, 129, 807, 165, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("Menu Interakcji", 468, 131, 805, 167, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("Menu Interakcji", 468, 129, 805, 165, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("Menu Interakcji", 469, 130, 806, 166, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawRectangle(373, 184, 537, 419, tocolor(0, 0, 0, 222), false)
end
Wysłany: 2014-09-27, 18:34
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Wyskakuje ERROR.
attempt to concatenate a boolean value
Wysłany: 2014-09-27, 21:24
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Maximerr , haha podawaj linijki kodu a nie.
Wysłany: 2014-09-27, 22:11
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Kolega na g?rze da?
Tagi: bind :: pod :: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: