Snakegold Posted November 19, 2023 Share Posted November 19, 2023 السلام عليكم مشكلتي انو اللون مو شغال لصورة اللاعب العادي "Player" 'aclGroup: Everyone' local rr, gg, bb = call(getResourceFromName("Core"), "getReputationColor", reputation, class) dxDrawImage ( math.ceil(posW), math.ceil(sy - 32), 16, 16, "class/"..class..".png", 0, 0, 0, tocolor(rr, gg, bb, 255) ) هذا كود nametag و هذا كود الي يغير لون الصورة function getReputationColor(length, class) local r, g, b if class == "Player" then r, g, b = 0, 1, 1 else if (length < 0) then r, g, b = 1, 0, 0 elseif (length >= 0 and length < 10) then r,g,b = 1, 1, 1 elseif (length >= 10 and length < 76) then r, g, b = 0, (length + 76)/152 , 0 elseif (length >= 76 and length <= 150) then r, g, b = 0, (length + 76)/128, 1 elseif (length > 150 and length <= 225) then r, g, b = 0, (length + 225)/-300, 1 elseif (length > 225 and length <= 375) then r, g, b = (length + 375)/375,0,-(length + 375) elseif (length > 375 and length <= 425) then r, g, b = (length + 425)/425,0,-(length + 155),0 elseif (length > 425 and length <= 500) then r, g, b = 0,-(length + 500)-400,150 end return r*255, g*255, b*255 end و هذا سيرفر سايد الnametag addEventHandler( 'onPlayerLogin', root, function ( ) local account = getPlayerAccount( source ) if account and not isGuestAccount( account ) then local accountName = getAccountName( account ) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Owner" ) ) then setElementData(source, "class", "Owner") return elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Root Developer" ) ) then setElementData(source, "class", "Root Dev") return elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Moderator" ) ) then setElementData(source, "class", "Moderator") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "SuperModerator" ) ) then setElementData(source, "class", "Super Moderator") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Administrator" ) ) then setElementData(source, "class", "Administrator") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Owner" ) ) then setElementData(source, "class", "Owner") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Community Manager" ) ) then setElementData(source, "class", "Community Manager") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Warden" ) ) then setElementData(source, "class", "Warden") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Quality Assurance" ) ) then setElementData(source, "class", "Quality Assurance") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Hero" ) ) then setElementData(source, "class", "Hero") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "VIP" ) ) then setElementData(source, "class", "Vip") elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Everyone" ) ) then setElementData(source, "class", "Player") end end end ) 0,1,1 المشكلة أنو لون الاعب ما يعطي لون و تصير الصورة سوداء 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