Wysłany: 2016-08-21, 16:34
Fizo
Arrlis
Wiek: 28 Na forum: 3638 dni Posty: 45
Witam mam problem mam gotow? stron? clienta panelu dodawania ale jak mog? wys?a? zmienn? nick na stron? serwera a potem u?y? tej zmiennej do funcji acl? Prosz? o pomoc
Ps. wiem ?e chodzi o funkcj? triggerServerEvent ale co mi po tym jak nie wiem w jaki spos?b u?y? tej funkcji.
Wysłany: 2016-08-21, 17:46
Intuicyjny.
Amator LUA
Wiek: 22 Na forum: 3788 dni Posty: 57
Nick w MP: Intuicyjny.
Piwa : 3
Wysłany: 2016-08-21, 19:13
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4329 dni Posty: 698
Piwa : 2080
Je?eli da?by? stron? clienta -_-
Wysłany: 2016-08-21, 19:43
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
-- C - side
triggerServerEvent ( "event" , resourceRoot , nick )
-- S - side
function funkcja ( nick )
-- tutaj wrzucasz t ? swoj ? funkcj ? acl
end
addEvent ( "event" , true )
addEventHandler ( "event" , resourceRoot , funkcja )
Wysłany: 2016-08-21, 20:21
Fizo
Arrlis
Wiek: 28 Na forum: 3638 dni Posty: 45
function rysuj ()
okienko = guiCreateWindow ( 0 , 0 , 0.4 , 0.8 , "Panel Lidera SAPD" , true )
b1 = guiCreateButton ( 0.6 , 0.8 , 0.3 , 0.2 , "Zamknij Panel" , true , okienko )
b2 = guiCreateButton ( 0.6 , 0.1 , 0.3 , 0.2 , "Dodaj" , true , okienko )
b3 = guiCreateButton ( 0.6 , 0.4 , 0.3 , 0.2 , "Usu?" , true , okienko )
showCursor ( true )
guiWindowSetSizable ( okienko , false )
playerList = guiCreateGridList ( 0 , 0.1 , 0.45 , 0.90 , true , okienko )
-- Create a players column in the list
column = guiGridListAddColumn ( playerList , "Gracze:" , 0.85 )
if ( column ) then --If the column has been created , fill it with players
for id , player in ipairs ( getElementsByType ( "player" )) do
local row = guiGridListAddRow ( playerList )
guiGridListSetItemText ( playerList , row , column , getPlayerName ( player ), false , false )
end
end
end
function dodaj ()
if source ~= b2 then return end
nick = guiGridListGetItemText ( playerList , guiGridListGetSelectedItem ( playerList ), 1 )
end
function usun ()
if source ~= b3 then return end
nick = guiGridListGetItemText ( playerList , guiGridListGetSelectedItem ( playerList ), 1 )
triggerServerEvent ( "remove" , resourceRoot , nick )
outputChatBox ( "Gracz o nicku: " .. nick .. " zosta? usuni?ty z frakcji" )
end
function zamknij ()
if source ~= b1 then return end
guiSetVisible ( okienko , false )
showCursor ( false )
end
addEvent ( "gui" , true )
addEventHandler ( "gui" , getRootElement (), rysuj )
addEventHandler ( "onClientGUIClick" , root , zamknij )
addEventHandler ( "onClientGUIClick" , root , dodaj )
addEventHandler ( "onClientGUIClick" , root , usun )
[ Dodano : 2016-08-21, 20:36 ]
Czemu mam access denied w debug script a w acl mam dodany skrypt do admina.
[ Dodano : 2016-08-22, 15:12 ]
Jest jaki? mi?y moderator,kt?ry zamknie temat bo ju? dzia?a.
Tagi: dodawanie :: acl :: przez :: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: