Client :
addEventHandler("onClientGUIClick", resourceRoot,
function()
if (source == GUIEditor.gridlist[4]) then
local Row = guiGridListGetSelectedItem (GUIEditor.gridlist[4])
local select = guiGridListGetItemText (GUIEditor.gridlist[4], Row, 1)
local player = getPlayerFromName(select)
if (select and select ~= "") then
if ( player ) then
triggerServerEvent("getSerial", localPlayer, player )
guiSetAlpha(GUIEditor.memo[2], 0.77)
else
guiSetText ( GUIEditor.memo[2] , "" )
guiSetAlpha(GUIEditor.memo[2], 0.17)
end
end
end
end)
Server :
addEvent("getSerial",true)
addEventHandler("getSerial", root,
function(player)
local playerName = getPlayerName(player)
local playerSerial = getPlayerSerial(player)
triggerClientEvent(source,"setSerial", source, playerName, playerSerial)
end)