Jump to content

Outlaw

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Outlaw

  1. addEvent("triggersuppmemo",true) function sendChatMessage(plyr) local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second -- Make sure to add a 0 to the front of single digits. if (hours < 10) then hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if (seconds < 10) then seconds = "0"..seconds end if supp_chat and isElement(supp_chat) then local newText = guiGetText(support_urmsg) triggerServerEvent("mutedplyer", localPlayer) if mutedplyer then return end if newText and string.len(newText) >= 4 then triggerServerEvent("triggersuppmemo", localPlayer, supp_chat) local oldText = guiGetText(supp_chat) if not oldText then oldText = "" end oldText = ( ( oldText ) .. "[" .. ( tostring ( hours ) ) .. ":" .. ( tostring ( minutes ) ) .. ":" .. ( tostring ( seconds ) ) .. "]" .. ( getPlayerName ( localPlayer ) ) .. ": " .. ( newText ) ) guiSetText(supp_chat, oldText) guiSetText(support_urmsg, "") guiMemoSetCaretIndex(supp_chat, string.len(oldText)) end end end addEventHandler("onClientGUIAccepted", resourceRoot, sendChatMessage) addEventHandler("triggersuppmemo", root, sendChatMessage) function triggerit (supp_chat) for i,v in ipairs(getElementsByType("player")) do triggerClientEvent(v, "triggersuppmemo", v, supp_chat, source) end end addEvent("triggersuppmemo", true) addEventHandler("triggersuppmemo", root,triggerit) بدي الرسائل تطلع لكل اللاعبين debug: Error : Server triggered clientsite event aSuport Text , but event is not added clientside
  2. السلام عليكم شباب معي سؤالين و هم إيش الفرق بين root و resourceRoot في الإيفينتات مثال: addEventHandler("onClientRender",resourceRoot,functionname) -- addEventHandler("onClientRender",root,functionname) والسؤال الثاني هو كيفية ترتيب "مدري وش إسمهم بس يكونو بين قوسين أمام" الفنكشن function (هدول)
  3. السلام عليكم والله جربت اكثر من 20 محاولة و ما نجحت يمكن أنا مش فاهم الترايقر function openOrCloseGUI () if guiGetVisible (mainWindow) then guiSetVisible (mainWindow, false) guiSetVisible (linkWindow, false) showCursor (false) else guiSetVisible (mainWindow, true) showCursor (true) end end addEvent("speakeronlystaffs",true) addEventHandler("speakeronlystaffs",resourceRoot,openOrCloseGUI) addCommandHandler ("speaker", openOrCloseGUI) bindKey (openKey, "down", openOrCloseGUI) function staffsonlyy(player) local accname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ("user." .. accname, aclGetGroup("Admin")) then triggerClientEvent(player,"speakeronlystaffs", getRootElement()) end end بدي اللوحة للأدمنية بس
  4. السلام عليكم بدي لما يكون اللاعب عليه ميوت ما يقرأ باقي السكريبت يعني ما يقدر يكتب في الشات تبع السبورت serverside: function checkismuteed (ply) if isPlayerMuted(ply) then return end end addEvent("mutedplyer",true) addEventHandler("mutedplyer",resourceRoot, checkismuteed) clientside: function sendChatMessage(plyr) local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second -- Make sure to add a 0 to the front of single digits. if (hours < 10) then hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if (seconds < 10) then seconds = "0"..seconds end if supp_chat and isElement(supp_chat) then local newText = guiGetText(support_urmsg) triggerServerEvent("mutedplyer", localPlayer) guiSetText(err_label, "You are muted!") if newText and string.len(newText) >= 4 then guiSetText(err_label, "") local oldText = guiGetText(supp_chat) if not oldText then oldText = "" end oldText = ( ( oldText ) .. "[" .. ( tostring ( hours ) ) .. "-" .. ( tostring ( minutes ) ) .. "-" .. ( tostring ( seconds ) ) .. "]" .. ( getPlayerName ( localPlayer ) ) .. ": " .. ( newText ) ) guiSetText(supp_chat, oldText) guiSetText(support_urmsg, "") guiMemoSetCaretIndex(supp_chat, string.len(oldText)) else end end end addEventHandler("onClientGUIAccepted", resourceRoot, sendChatMessage)
  5. ممكن تصحيح لهذا الكود؟ بدي اضيف الوقت قبل الإسم oldText = oldText "..[""..hours.."-"..minute..""..second.." .." "" .. getPlayerName(localPlayer) .. ": " .. newText .. ""\n" debug: unexpected symbol near ""..second..""
  6. تم حل المشكلة ^^
  7. السلام عليكم جربت كتييييير و ما لقيت حل function sendChatMessage() if supp_chat and isElement(supp_chat) then local newText = guiGetText(support_urmsg) if newText and string.len(newText) > 0 then local oldText = guiGetText(supp_chat) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(g_LocalPlayer) .. ": " .. newText .. "\n" guiSetText(supp_chat, oldText) guiSetText(support_urmsg, "") guiMemoSetCaretIndex(supp_chat, string.len(oldText)) end end end addEventHandler("onClientGUIAccepted", g_ResourceRoot, sendChatMessage) أشتغل على مود مساعدة لما اظغط على Enter الرسالة ما تطلع ليش؟
  8. لا ما اشتغل لنو كودي أنا من فنكشن طويلة addEventHandler ( "onClientRender", nametags_Root, function() if getElementData(getLocalPlayer(), "state.hud") == "disabled" then return end for i,player in ipairs(nametags_Players) do if isElement(player) then setPlayerNametagShowing ( player, false ) if not nametags[player] then nametags.Create ( player ) end end end if Nametags_Hide then return --etc --etc --etc if getElementData(player, "invincible") == false then if class and team then dxDrawImage ( sx - math.max(nameWidth/4, teamWidth/2.5) - 4.3*scale, sy - 18, 18, 18, ":Experience/Emblems/"..H..".png" ) elseif class and not team then dxDrawImage ( sx - math.max(nameWidth/4, teamWidth/2.9)- 2*scale, sy - 18, 18, 18, ":Experience/Emblems/"..H..".png" ) end end if getElementData(player, "invincible") == true then if class and team then dxDrawImage ( sx - math.max(nameWidth/4, teamWidth/2.5) - 4*scale, sy - 18, 18, 18,":freeroam/icon.png" ) elseif class and not team then dxDrawImage ( sx - math.max(nameWidth/4, teamWidth/3.1) - 2*scale, sy - 18, 18, 18,":freeroam/icon.png" ) end end -- etc -- etc -- etc
  9. السلام عليكم و رحمة الله شباب هذا مود إسم يضهر فوق الشخصية و لما يكون الشخص في حالة نوديثماتش بتضهر صورة جنب إسمها المشكل أنو الصورتين يطلعو فوق يعضهم if getElementData(player, "invincible") == false or getElementData(player, "invincible2") == false then if class and team then dxDrawImage ( sx - math.max(nameWidth/4, teamWidth/2.5) - 6*scale, sy - 20, 20, 20, ":Experience/Emblems/"..H..".png" ) elseif class and not team then dxDrawImage ( sx - math.max(nameWidth/3.2, teamWidth/3) - 4*scale, sy - 18, 18, 18, ":Experience/Emblems/"..H..".png" ) end end end if getElementData(player, "invincible") == true or getElementData(player, "invincible2") == true then if class and team then dxDrawImage ( sx - math.max(nameWidth/4, teamWidth/2.5) - 6*scale, sy - 18, 18, 18,":freeroam/icon.png" ) elseif class and not team then dxDrawImage ( sx - math.max(nameWidth/3.2, teamWidth/3) - 4*scale, sy - 18, 18, 18,":freeroam/icon.png" ) end end
×
×
  • Create New...