Lorder Posted March 18, 2017 Posted March 18, 2017 (edited) Why does not work ? I authorized Server.lua seriale = { [ 'Podszywka Mitnicka' ] = 'EC625053E762093C4DA83FC51E74425F' } addEventHandler ( 'onPlayerJoin', getRootElement ( ), function ( _, theCurrentPlayers ) local Serial = seriale[getPlayerName(theCurrentPlayers)] if ( Serial ) then if Serial ~= getPlayerSerial ( source ) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo !' ) end end end ) meta.xml <meta> <info author="Lorder" type="script" name="AutoBan" version="1.0.0" /> <script src="server.lua" type="client" /> </meta> Edited March 18, 2017 by Lorder
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 (edited) <meta> <info author="Lorder" type="script" name="AutoBan" version="1.0.0" /> <script src="server.lua" type="server" /> </meta> And replace your function. addEventHandler ( 'onPlayerJoin', getRootElement ( ), function () local Serial = seriale[getPlayerName(source)] if ( Serial ) then if Serial ~= getPlayerSerial ( source ) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo !' ) end end end ) Edited March 18, 2017 by NeXuS™ 1 Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 6 minutes ago, NeXuS™ said: <meta> <info author="Lorder" type="script" name="AutoBan" version="1.0.0" /> <script src="server.lua" type="server" /> </meta> And replace your function. addEventHandler ( 'onPlayerJoin', getRootElement ( ), function () local Serial = seriale[getPlayerName(source)] if ( Serial ) then if Serial ~= getPlayerSerial ( source ) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo !' ) end end end ) Add serial ?
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 Keep your script as it is above this code. Replace just what I wrote not the whole script. 1 Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 3 minutes ago, NeXuS™ said: Senaryonuzu bu kodun üstünde olduğu gibi saklayın. Yazdıklarımı tüm senaryoyu değil, değiştirin. Thx I try now
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 Alright. If you need further help, or any error appears, feel free to ask here. 1 Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 @NeXuS™ No, but I tried my own serial, did not work
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 (edited) Can you write down your name copied from the settings and your serial? (F8 -> serial) serialList = { ["#NeXuS"] = "73B520027203B67334A182ED91E6CD54" } addEventHandler("onPlayerJoin", getRootElement(), function() local selectedSerial = serialList[getPlayerName(source)] if (selectedSerial) then if selectedSerial ~= getPlayerSerial(source) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo !' ) end end end) This one works totally fine for me. Edited March 18, 2017 by NeXuS™ 1 Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 3 minutes ago, NeXuS™ said: Can you write down your name copied from the settings and your serial? (F8 -> serial) seriale = { [ 'Podszywka Mitnicka' ] = 'EC625053E762093C4DA83FC51E74425F' } addEventHandler ( 'onPlayerJoin', getRootElement ( ), function () local Serial = seriale[getPlayerName(source)] if ( Serial ) then if Serial ~= getPlayerSerial ( source ) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo !' ) end end end ) I did so
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 Just copy your name from settings and your serial (F8->serial) on this page as a comment. 1 Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 [ 'Lorder' ] = 'EC625053E762093C4DA83FC51E74425F' not working @NeXuS™
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 Can you screenshot your settings with your name and a pic of your serial in F8 please?@Lorder 1 Did I help you? NeXuS™#0001
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 Can you write down what do you exactly want from this script? Did I help you? NeXuS™#0001
Addlibs Posted March 18, 2017 Posted March 18, 2017 To be honest, I'd suggest cancelEvent(true) onPlayerConnect instead of issuing bans... Your idea will surely spam the f- out of your banslist. Previously known as MrTasty.
Lorder Posted March 18, 2017 Author Posted March 18, 2017 6 minutes ago, NeXuS™ said: Bu senaryodan tam olarak ne istiyordun yazabilir misin? serial auto banned
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 Jees, I dont understand you dude. If someone else comes up with your name with a different serial, then ban them? Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 2 minutes ago, NeXuS™ said: Jees, I dont understand you dude. If someone else comes up with your name with a different serial, then ban them? I forbid someone to remove the ban from someone admin wants to be automatically banned when they enter the server
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 (edited) Try this one: serialList = { ["enteryourserialhere"] = true, ["anotherserialhere"] = true } addEventHandler("onPlayerJoin", getRootElement(), function() local selectedSerial = serialList[getPlayerSerial(source)] if (autoBan) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo!' ) end end) Edited March 18, 2017 by NeXuS™ Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 6 minutes ago, NeXuS™ said: Try this one: serialList = { ["enteryourserialhere"] = true, ["anotherserialhere"] = true } addEventHandler("onPlayerJoin", getRootElement(), function() local selectedSerial = serialList[getPlayerSerial(source)] if (autoBan) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo!' ) end end) Not working
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 And whats wrong with it? Did I help you? NeXuS™#0001
Lorder Posted March 18, 2017 Author Posted March 18, 2017 3 minutes ago, NeXuS™ said: And whats wrong with it? I tried, but he did not forbid me
NeXuS™ Posted March 18, 2017 Posted March 18, 2017 My bad. serialList = { ["yourserailhere"] = true, ["anotherserialhere"] = true } addEventHandler("onPlayerJoin", getRootElement(), function() local autoBan = serialList[getPlayerSerial(source)] if (autoBan) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo!' ) end end) This one works totally fine. 1 Did I help you? NeXuS™#0001
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