pepsi18 Posted June 3, 2014 Share Posted June 3, 2014 is possible ban a player with a particular account when it login Link to comment
toxicsmoke11 Posted June 3, 2014 Share Posted June 3, 2014 function testOne() local playerAccount = getPlayerAccount(source) if playerAccount == "test" then banPlayer(source) end end addEventHandler("onPlayerLogin",root,testOne) not tested,add this resource to admin acl group to work and change test to your account name which u want banned Link to comment
-.Paradox.- Posted June 3, 2014 Share Posted June 3, 2014 Use getAccount name, and check if the player's account name is "textname" and then ban him/her. Link to comment
Max+ Posted June 3, 2014 Share Posted June 3, 2014 addEventHandler ( 'onPlayerLogin', getRootElement ( ), function () if (getPlayerAccount(getAccountName(source) == 'Name Here' )) then banPlayer ( source, false, false, true, getRootElement ( ), 'reason ban' ) end end ) learn from it , Link to comment
RenanPG Posted June 3, 2014 Share Posted June 3, 2014 Try this: Use server-side function ban() local accname = getAccountName(source) if ( accname == "Name Here" ) then banPlayer(source) end end addEventHandler("onPlayerLogin", root, ban) Link to comment
TAPL Posted June 3, 2014 Share Posted June 3, 2014 AccBans = { ["Account Name Here"] = true, ["Account Name Here"] = true, ["Account Name Here"] = true } addEventHandler("onPlayerLogin", root, function(_, account) local accountName = getAccountName(account) if AccBans[accountName] then banPlayer(source) end end) Link to comment
.:HyPeX:. Posted June 4, 2014 Share Posted June 4, 2014 banPlayer lets you ban by username thougt. just re-read the function. 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