Search the Community
Showing results for tags 'فنكتشنات'.
-
السلام عليكم ورحمة الله وبركاتة كيف حال الشباب ان شاء الله طيبين اليوم انا طالب شي منكم شوفو في جدول تختار منو خاصية للوحة المساعدة اما تختار 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)