^#Dream Posted October 20, 2014 Share Posted October 20, 2014 السلام عليكم عندي مشكلة بالسكور بورد if column.name == "country" and content ~= "?" then local countryName = getCountryNameFromCode(content) or content local countryString = ":admin/client/images/flags/"..content:lower()..".png" if fileExists(countryString) then local imageX = (dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )-s(4))*1.4 dxDrawImage(topX+theX+s(1), y+s(3), imageX,dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )-s(5),countryString,0,0,0,tocolor(255,255,255,a or 255)) dxDrawText( countryName, topX+theX+s(6)+imageX, y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( countryName, topX+theX+s(5)+imageX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) else dxDrawText( countryName, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( countryName, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end else dxDrawText( content, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( content, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end end end واذا شغلت السكور بورد يقولي [16:45:23] ERROR: scoreboard\dxscoreboard_exports.lua:295: call: failed to call 'admin:getPlayerCountry' والسطر 295 من ملف اكسبورتس function onServerIDStart() for i,thePlayer in pairs(getElementsByType("player")) do findIDForPlayer(thePlayer) local country = call(getResourceFromName("admin"),"getPlayerCountry",source) if country then setElementData(source,"country",country) else setElementData(source,"country","?") end end end addEventHandler("onResourceStart",resourceRoot,onServerIDStart) Link to comment
فاّرس Posted October 20, 2014 Share Posted October 20, 2014 اهلين .. findIDForPlayer = وين معرفه ؟ + السورس غير معرف بالكود . Link to comment
^#Dream Posted October 22, 2014 Author Share Posted October 22, 2014 function findIDForPlayer(thePlayer) if thePlayer and not getElementData(thePlayer,"ID") then local i = 0 local players = getElementsByType("player") repeat local foundID = false i = i + 1 for _,player in pairs(players) do if player ~= thePlayer then local playerID = tonumber(getElementData(player,"ID")) if playerID == i then foundID = true break end end end until not foundID setElementData(thePlayer,"ID",i) end end وحطيت السورس بالفنكشن مازبط Link to comment
فاّرس Posted October 22, 2014 Share Posted October 22, 2014 .السورس حقه هو المود الي اشتغل مو اللاعب onResourceStart الحدث Link to comment
^#Dream Posted October 23, 2014 Author Share Posted October 23, 2014 ^ والله مافهمت عليك : ( Link to comment
فاّرس Posted October 23, 2014 Share Posted October 23, 2014 يصير السورس هو المود الي اشتغل (onResourceStart) داخل الحدث (source) يوم تحط سورس بمعنى آخر انت قاعد تجيب مدينه المود الي اشتغل , و تجيب الداتا حق المود , السورس في الحدث هو المود الي اشتغل مو اللاعب , 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