Jump to content

مساعدة !؟


#Major .

Recommended Posts

1 hour ago, #Soking said:

بس كدا الشخصيه بتكون وهمية و تظهر له فقط

+1

ممكن يسوي كذا

--Client
ForbSkins = {66, 33}

function isSkinAllowed(skin)
	if skin then
		for _,v in ipairs(ForbSkins) do
			if skin == v then
				return false
			end
		end
	end
	return true
end

addEventHandler("onClientGUIClick", guiRoot,
	function()
		if source == Skinb then
			local skinID = tonumber(guiGetText(skiNA)) or 0
			if skinID >= 0 then
				if isSkinAllowed(skinID) then
                   triggerServerEvent("onPlayerChangeSkin", localPlayer, skinID)
				else
					outputChatBox("شخصية ممنوعه", 255, 0, 0)
				end
			end
		end
	end
)

--Server
addEvent("onPlayerChangeSkin",true)
addEventHandler("onPlayerChangeSkin",getRootElement(),
function(skinID)
setElementModel(source, skinID)
end
)

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...