Jump to content

Check From Skin


SkiZo

Recommended Posts

function check (theplayer)
local account = getPlayerAccount( theplayer )
local id = getElementModel ( theplayer )
local accountName = ( account and getAccountName ( account ) )
if not( accountName == "AccountName" ) 	and id == 17 then
setPlayerSkin(theplayer, 312)		
outputChatBox("#FF0000ERROR: #FFF00Private Skin.", theplayer, 255, 255, 255, true)	
			
else		
cancelEvent()			
end
end
setTimer (check, (1000*3),0)

Help me!  Doesn't work :S 

Line 2+3 or 3+4 .. :/ debug script say that the bug is there.

Edited by Legend<3
Link to comment

This may should work:

 

function check ()
	for i,player in ipairs(getElementsByType("player")) do
		local account = getPlayerAccount(player)
		local id = getElementModel(player)
		if ( account ) then
			local accountName = getAccountName(account)
			if not ( accountName == "AccountName" ) and ( id == 17 ) then
				setElementModel(player,312)		
				outputChatBox("#FF0000ERROR: #FFF00Private Skin.", player, 255, 255, 255, true)		
			end
		end
	end
end
setTimer(check,3000,0)

You must tell the script which player you want to check. I made a loop that will check all the players.

Link to comment
5 minutes ago, Erknneto said:

This may should work:

 


function check ()
	for i,player in ipairs(getElementsByType("player")) do
		local account = getPlayerAccount(player)
		local id = getElementModel(player)
		if ( account ) then
			local accountName = getAccountName(account)
			if not ( accountName == "AccountName" ) and ( id == 17 ) then
				setElementModel(player,312)		
				outputChatBox("#FF0000ERROR: #FFF00Private Skin.", player, 255, 255, 255, true)		
			end
		end
	end
end
setTimer(check,3000,0)

You must tell the script which player you want to check. I made a loop that will check all the players.

Thank You ^_^ 

:) SOLVED ;)

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...