D7mas Posted December 14, 2017 Share Posted December 14, 2017 السلام عليكم ورحمة الله وبركاتة كيف حال الشباب ان شاء الله طيبين اليوم انا طالب شي منكم شوفو في جدول تختار منو خاصية للوحة المساعدة اما تختار supports offline help طبعاً في جريد ليست للاعبين الي بسيرفر تختار لاعب وتدوس زر تغير تجيه الحالة الي اخترتها من فوق بس الكود في خطأ والدي بق ما يطلع شي Help Me Please addEventHandler("onClientGUIClick", resourceRoot, function() if source == Change and guiComboBoxGetSelected(StatBox) ~= -1 then local Stat = guiComboBoxGetItemText(StatBox, guiComboBoxGetSelected(StatBox)) local playerName = guiGridListGetItemText(PlayersGridList, guiGridListGetSelectedItem(PlayersGridList), 1) triggerServerEvent("SupportSystem:adminSetStat", localPlayer, getPlayerFromName(playerName), Stat) refreshSupportList() end end ) function refreshSupportList() guiGridListClear(SupportList) for _,players in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(SupportList) if getElementData(players, "stat") == "support" then guiGridListSetItemText(SupportList, row, 1, getPlayerName(players), false, false) guiGridListSetItemColor(SupportList, row, 1, 0, 255, 0) end end end --- # server Code addEvent("SupportSystem:adminSetStat", true) addEventHandler("SupportSystem:adminSetStat", root, function(player, Stat) setElementData(player, "stat", Stat) exports["guimessages"]:outputServer(player, "#FFFFFF[ #e1e1e1Support Chat #FFFFFF] : #00ff00"..getPlayerName(source).." has changed your support states to #ff0000"..Stat) exports["guimessages"]:outputServer(player, "#FFFFFF[ #e1e1e1Support Chat #FFFFFF] : #00ff00"..getPlayerName(player).." states changed to #ff0000"..Stat) sendMessageToLogs(getPlayerName(source).." changed "..getPlayerName(player).." support states to "..Stat) end) Link to comment
XML Posted December 14, 2017 Share Posted December 14, 2017 تأكد من اسامي الازرار .. وغيرها الكود ماشوف فيه غلط Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now