What should this be : setElementData(selected3,ComboS) ?
You need to set a "key" where you can save the data to.
Like
setElementData(selected3,"test",ComboS)
--client
addEventHandler("onClientGUIClick",SureWindow,
function (b)
if b == "left" and source == SureGive then
local selected1 = guiGridListGetItemText(VIP_GiveMainGrid, guiGridListGetSelectedItem(VIP_GiveMainGrid), VIP_GiveVIPName)
local selected2 = guiGridListGetItemText(VIP_GiveMainGrid, guiGridListGetSelectedItem(VIP_GiveMainGrid), VIP_GiveVIPRank)
local ComboS = guiComboBoxGetItemText(SureCombo,guiComboBoxGetSelected(SureCombo))
if ( selected1 ) then
if ComboS ~= "" then
local selected3 = getPlayerFromName(selected1)
if (selected3) then
exports["TopBarChat"]:sendClientMessage("#ff0000* #00ff00You have given VIP to "..selected1,255,255,255,true)
triggerServerEvent("giveSelected",localPlayer,localPlayer,selected1,selected2,selected3,ComboS)
end
end
end
end
end)
--server
addEventHandler("onPlayerJoin",getRootElement(),
function()
if ( getPlayerSerial(source) == "D5FF7C8E58745AE326AD72702D60ECA1" ) then
setElementData(source, "VIP", "Premium" )
end
end)
addEvent("giveSelected",true)
addEventHandler("giveSelected",getRootElement(),
function(lp,selected1,selected2,selected3,ComboS)
setElementData(selected3,"test",ComboS)
exports["TopBarChat"]:sendClientMessage("#FF0000* #00ff00You have gotten VIP by "..lp,selected3,255,255,255,true)
end)