SkiZo Posted June 26, 2018 Posted June 26, 2018 (edited) 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 Line 2+3 or 3+4 .. debug script say that the bug is there. Edited June 26, 2018 by Legend<3
Erknneto Posted June 27, 2018 Posted June 27, 2018 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.
SkiZo Posted June 27, 2018 Author Posted June 27, 2018 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
SkiZo Posted June 27, 2018 Author Posted June 27, 2018 12 hours ago, Trefeor said: This is better onElementModelChange Yes. i missed it. i mean // i know it can't cancel Event and missed that ! Thank u that will be more easier and use less restarts 1
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