Jump to content

[Solved]does this correct?


Sora

Recommended Posts

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 by Guest
Link to comment
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
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
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
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

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