Sora Posted July 4, 2012 Share Posted July 4, 2012 (edited) hey guys i made simple script to kick who login with stolen account , but i tried to test it and nothing happend and without errors in debugscript so is it correct ? and what the problem? addEventHandler ( "onPlayerLogin", getRootElement(), function () local serial = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" local theSerial = getPlayerSerial( source ) local acc = getPlayerAccount( source ) local account getAccountName(acc) if theSerial == serial and account =="sora" then outputChatBox ( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) elseif theSerial == theSerial and account == account then outputChatBox ( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) else kickPlayer ( source, source, "Don't use this account anymore!" ) outputChatBox ( "* " .. getPlayerName ( source ) .. " kicked for using stolen account .", getRootElement(), 255, 255, 255, true ) end end) Note : if you coming to help , you're welcome if you not coming to help , please get out Edited July 5, 2012 by Guest Link to comment
12p Posted July 4, 2012 Share Posted July 4, 2012 addEventHandler ( "onPlayerLogin", getRootElement(), function () local serial = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" local theSerial = getPlayerSerial( source ) local acc = getPlayerAccount( source ) local account = getAccountName( acc ) if theSerial == serial and account == "sora" then outputChatBox( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) else kickPlayer( source, source, "Don't use this account anymore!" ) outputChatBox( "* " .. getPlayerName ( source ) .. " kicked for using stolen account .", getRootElement(), 255, 255, 255, true ) end end ) Try now? Link to comment
Sora Posted July 4, 2012 Author Share Posted July 4, 2012 addEventHandler ( "onPlayerLogin", getRootElement(), function () local serial = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" local theSerial = getPlayerSerial( source ) local acc = getPlayerAccount( source ) local account = getAccountName( acc ) if theSerial == serial and account == "sora" then outputChatBox( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) else kickPlayer( source, source, "Don't use this account anymore!" ) outputChatBox( "* " .. getPlayerName ( source ) .. " kicked for using stolen account .", getRootElement(), 255, 255, 255, true ) end end ) Try now? yep but with your code it's kick every who login even if was with another account Link to comment
12p Posted July 4, 2012 Share Posted July 4, 2012 addEventHandler ( "onPlayerLogin", getRootElement(), function () local serial = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" local theSerial = getPlayerSerial( source ) local acc = getPlayerAccount( source ) local account = getAccountName( acc ) if account == "sora" then if theSerial == serial then outputChatBox( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) else kickPlayer( source, source, "Don't use this account anymore!" ) outputChatBox( "* " .. getPlayerName ( source ) .. " kicked for using stolen account .", getRootElement(), 255, 255, 255, true ) end end end ) Link to comment
Sora Posted July 4, 2012 Author Share Posted July 4, 2012 addEventHandler ( "onPlayerLogin", getRootElement(), function () local serial = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" local theSerial = getPlayerSerial( source ) local acc = getPlayerAccount( source ) local account = getAccountName( acc ) if account == "sora" then if theSerial == serial then outputChatBox( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) else kickPlayer( source, source, "Don't use this account anymore!" ) outputChatBox( "* " .. getPlayerName ( source ) .. " kicked for using stolen account .", getRootElement(), 255, 255, 255, true ) end end end ) yep now it works fine thanks alot ^^ 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