Jump to content

iiv03

Members
  • Posts

    476
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by iiv03

  1. why does not happen when update color team after i wrote colors for several times? team = {} colour = {} colour.r = 255 colour.g = 85 colour.b = 85 local tagColor = rgbToHex(colour.r,colour.g,colour.b) or "#FFFFFF" function updateTeamSettings(playerSource,cmd,R,G,B) local playerName = getPlayerName(playerSource) local account = getPlayerAccount (playerSource) local account_name = getAccountName(account) if isObjectInACLGroup ( "user." .. account_name, aclGetGroup ( "Admin" )) then if not R or not G or not B then outputChatBox("Syntex /color R G B",playerSource,255,255,255,true) return end if tonumber(R) <= 50 and tonumber(G) <= 50 and tonumber(B) <= 50 then colour.r = 255 colour.g = 255 colour.b = 255 else colour.r = R colour.g = G colour.b = B end updateTeamColour() tagColor = rgbToHex(colour.r,colour.g,colour.b) or "#FFFFFF" triggerClientEvent(getRootElement(), "updateName", getRootElement(), homeName, homeTag, enemyName, enemyTag,colour.r,colour.g,colour.b) outputChatBox("Done Update",playerSource,255,255,255,true) team[2] = createTeam ( enemyName, colour.r,colour.g,colour.b) end end addCommandHandler("color",updateTeamSettings) function updateTeamColour() setTeamColor ( team[2], colour.r, colour.g, colour.b ) end
  2. i know but i wanna set team vs team that's what i want example: dxDrawText("Players: [#060660"..team_home.."/"..colorenemy..team_enemy.."], etc. . . . .
  3. i want to ask how i should extract colors from the server to client i used local r,g,b = unpack(enemy_color) for client and this worked with tocolor(....255) so how to use it like #FFFFFF? my trying
  4. ي حبيبي آدري هاذي تغير وضعيه حركه لما تنفتح تسوي اشكال انا ابغاه أذا خلص الرقممء حق getTickCount يرجع يعيد من بدايه
  5. شسالفه مشكله ماحد يقدر يحله صعبه؟
  6. Hello there I want to ask how make switch lock and unlock? example: If a player enter a team and cannot I want someone else if he wrote /join can not access FIRST and SECOND team only If i type /djoin stops of entering people in team .. i don't want make that with ACL Group is there another way? i tried this and it didn't work addCommandHandler("djoin", function(command, teamId) teamId = tonumber(teamId) or false if not teamId == 1 then team = clanwar.homeTeam outputChatBox("work", root, 255, 255, 255, true) teamColor = clanwar.homeTeamData.color elseif teamId == 2 then team = clanwar.guestTeam end end) my code addCommandHandler("join", function(player, command, teamId) teamId = tonumber(teamId) or false if not teamId then outputChatBox("Syntax: /join [id]", player, 255, 0, 0, true) return end local team = nil local teamColor = "#FFFFFF" if teamId == 0 then -- TEAM SPECTATORS team = clanwar.spectatorsTeam elseif teamId == 1 then -- FIRST TEAM team = clanwar.homeTeam teamColor = clanwar.homeTeamData.color elseif teamId == 2 then -- SECOND TEAM team = clanwar.guestTeam teamColor = clanwar.guestTeamData.color elseif teamId == 3 then -- TEAM SPTREAMING local accountName = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup("user."..accountName, aclGetGroup("Streaming")) then outputChatBox("#313131ERROR #ffffff| You are not allowed to join this team #ff0000invisible", player, 255, 0, 0, true) return end team = clanwar.refereesTeam -- TEAM REFEREES local r, g, b = getTeamColor(clanwar.refereesTeam) teamColor = string.format("#%.2X%.2X%.2X", r, g, b) elseif teamId == 4 then local accountName = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup("user."..accountName, aclGetGroup("Referees")) then outputChatBox("#313131ERROR #ffffff| You are not allowed to join this team #ff0000invisible", player, 255, 0, 0, true) return end team = clanwar.streamersTeam local r, g, b = getTeamColor(clanwar.streamersTeam) teamColor = string.format("#%.2X%.2X%.2X", r, g, b) else outputChatBox("Please enter an id between 0 and 4.", player, 255, 0, 0, true) return end if getPlayerTeam(player) == team then outputChatBox("You are already in "..getTeamName(team)..".", player, 255, 0, 0, true) return end if not team then return end setPlayerTeam(player, team) outputChatBox("#FF8800* #FFFFFF"..getPlayerName(player).." #FFFFFFhas joined "..teamColor..getTeamName(team), root, 255, 255, 255, true) end)
  7. ألسلام عليكم ورحمة الله وبركاته عندي مشكله هنا حاولت اخلي النص لما يخلص الوقت بعدين يرجع النص للبدايه وكذا يبقى لانهائي مبتدئ في برمجه لخبصت شوي وقد محاولت ماتزبط محاولتي local tick = getTickCount() addEventHandler("onClientRender", root, function() local progress = math.min((getTickCount()-tick)/2000,tick) test.moveX = interpolateBetween(test.moveX, test.moveY, 0, 1, 0, 0, progress, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0",sX*0.35-test.moveX,sY*0.15,250,250,tocolor(255,255,255,255), 2.00, "default-build", "left", "center", false) end )
  8. ترا مأستفدت شيئ ب موضوع انا حبيت بس اخلي يتكرر التأيم بين 255 ينزل 0 ويرجع نفس شيئ و بنسبه ل Linear ترا أدري هاذي تغير وضعية الحركه بس
  9. أدري بس انا احتاجهم clip فيه طريق انه لازم تسوي كذا مدري بتزبط ولا وقولي رأيك function dxDrawBoundingText(text, x, y, width, height, color, size, font, verticalAlign, horizontalAlign) local ColorCoded = false if not text or not tonumber(x) or not tonumber(y) or not tonumber(width) or not tonumber(height) then return false end ColorCoded = true if not color then color = tocolor(255, 255, 255, 255) end if type(size) ~= "number" then size = 1 end if not font then font = "default-bold" end if not verticalAlign then verticalAlign = "left" end if not horizontalAlign then horizontalAlign = "top" end return dxDrawText(text, x, y, x + width, y + height, color, size, font, verticalAlign, horizontalAlign, true, false, false, ColorCoded) end
  10. فيه طريق ثاني افعل color coded لوحده؟
  11. lol, there is no idea for responses I have fixed it myself i used dxGetTextWidth https://wiki.multitheftauto.com/wiki/DxGetTextWidth
  12. I haven't used it once i used dxDrawText to give name of the players but i have no idea what I gave me. can you give me an example example please? but I didn't understand how to use it?
  13. hey is there a way to turn color coded + clips together in dxDrawText? In real i read Syntax and i saw you should turn off clip colorCoded: Set to true to enable embedded #FFFFFF color codes. Note: clip and wordBreak are forced false if this is set. please help guys i was been searching for weeks and have not found a solution
  14. هل فيه طريق ثاني عشان افعل colorcodedd في dxdrawtext + clip? في سآنتكس يقول لازم تطفي clip عشان يشتغلك الوان colorcodedd وكذا يصير بق
  15. عندي سؤال @Live أسف علي ازعاج خوي ليش dxGetTextWidth لما خليت في اخر شيئ bColerCoded = true النك ماصار فيه الوان ? شفت ب سآنتكس مكتوب bool bColorCoded=false] ) سويته كذا local textWidth = dxGetTextWidth(name, hud.fontSize, hud.font, true) ومآصار النك مع الوان ياليت تساعدني
  16. اشتغل والله مشكور والله ويعطيك الف عافيه انا كنت شايف حاط اقواص بين () بس هي {}
  17. مشكور والله فهمته من شرحك طلع لي مشكله ثانيه في تيبل كل ماخش التيم الأول يصير ارور 'paris' (table expected, got boolean) يسوي لي سبام ويضهر الدي اكس حق فريق ثاني بس لو خشيت انا علي فريق 2 -- يجي في ارور سبام ديبوق في التيم الأول اذا خشيته for id, player in ipairs ( homeTeamAlive ) do -- هنا برضو يجي ارور سبام for id, player in pairs(guestTeamAlive) do يجيني نفس المشكله الي فوق بس علي لوب تيبل ثاني هاذي أكواد وقولي وين مشكله؟ function drawHUD() -- TEAM 1 local homeTeamAlive = AlivePlayersInTeam(homeTeam) for id, player in ipairs ( homeTeamAlive ) do local r,g,b = 255,255,255 if player.alive then r,g,b = 216,36,36 end do local iconSize = hud.height * 0.5 dxDrawImage(offsetX + hud.width/1.1 - 18, offsetY - 19, iconSize, iconSize, "img/heart.png",0,0,0, tocolor(r, g, b, math.min(225, generalAlpha))) end offsetY = offsetY + hud.height end -- TEAM 2 local guestTeamAlive = AlivePlayersInTeam(guestTeam) local iconSize = hud.height * 0.5 for id, player in pairs(guestTeamAlive) do local r,g,b = 255,255,255 if player.alive then r,g,b = 216,36,36 end do dxDrawImage(offsetX + hud.width/1.1 - 18, offsetY - 19, iconSize, iconSize, "img/heart.png",0,0,0, tocolor(r, g, b, math.min(225, generalAlpha))) end end dxDrawRectangle(offsetX, offsetY, hud.width, hud.height, tocolor(33, 39, 57, math.min(255, generalAlpha)), false) offsetY = offsetY + hud.height end
  18. يبوي قد مآحولت يجني نفس الخطأ تكفي حل local text = getPlayersInTeam ( guestTeam ) local textWidth = dxGetTextWidth(text, hud.fontSize, hud.font) dxDrawBoundingText(text, offsetX + 8, offsetY, hud.width/2, hud.height, tocolor(255, 255, 255, math.min(225, generalAlpha)), hud.fontSize, hud.font, "right", "center")
  19. سويت محاولة وفي ديبوق يجني argumant 1 got table وش سآلفه local guestPlayers = getPlayersInTeam ( guestTeam ) local testPlayers = dxGetTextWidth(guestPlayers, 3, "default-bold", true) -- for testing -- Loop Players for playerKey, playerValue in ipairs ( testPlayers ) do dxDrawBoundingText(getPlayerName(playerValue), offsetX + 5, offsetY, hud.width/2, hud.height, tocolor(255, 255, 255, math.min(225, generalAlpha)), hud.fontSize, hud.font, "right", "center") end
  20. مشكور والله مستر وآيفي بس وش سالفه ال dxDrawText > كيف آخليهم اللون شغال و clipشغال هنا اشوف ملاحظه ب سآنتكس لأزم اطفي clip عشان يشتغل colorcodedd بس سؤالي هل فيه طريق ثاني اخلي colorcoded يشتغل مع clip? colorCoded: Set to true to enable embedded #FFFFFF color codes. Note: clip and wordBreak are forced false if this is set. وكيف آخليdxDrawRectangle يتحرك علي حسب عدد لاعبين؟ مثل سكور بورد يأليت تساعدني
  21. ألسلام عليكم ابغى استفسر عن كيف اسوي الاسم لاعب مرتب مثل جدول أو سكور بورد تقريبأ وكيف اخليdxDrawRectangle ينزل لو خش الاعب او خرج ----------------- عندي مشكله ب dxDrawText لما اسوي يصير بق ومآيشتغل postGUI هل فيه طريق ثانيه عشان اسوي اسم لاعب يضهر فيه الوان فيdxDrawText? معي مشكله ثانيه الي هي الاعب بين فريق و فريق بحأول اسوي كل واحد يخش فريق يضهر اسمه او نكه استخدمت فاكشن getPlayerName --OUR TEAM local homePlayers = getPlayerName(localPlayer) dxDrawBoundingText(homePlayers, offsetX + 5, offsetY, hud.width/2, hud.height, tocolor(255, 255, 255, math.min(225, generalAlpha)), hud.fontSize, hud.font, "right", "center") --TEAM GUEST local guestPlayers = getPlayerName(localPlayer) dxDrawBoundingText(guestTeamAlive, offsetX + hud.width/2, offsetY, hud.width/2 - 5, hud.height, tocolor(255, 255, 255, math.min(225, generalAlpha)), hud.fontSize, hud.font, "right", "center") بس صار اثنين نك في فريقين وانا داخل ب فريق اول مفروض يضهر نك واحد ب فريق اول مثل ب صوره مساعده بالله ?
  22. كيف اسويه radius معليش ممكن تقولي طريقه؟
  23. لوووووول آددري بس اقصد الطريق حق كذا يكون مآيل علي جنب كيف
×
×
  • Create New...