Lorder Posted February 22, 2017 Share Posted February 22, 2017 I want to do something like this Script name ? or Code ? Link to comment
Fist Posted February 22, 2017 Share Posted February 22, 2017 (edited) Just when player joins game do cancelEvent() then set his camera location wherever you want and add that information on screen. edit: actually nvm, you will have to make completly custom ban system seprate from MTA's built-in. Edited February 22, 2017 by Fist Link to comment
Lorder Posted February 22, 2017 Author Share Posted February 22, 2017 5 minutes ago, Fist said: Just when player joins game do cancelEvent() then set his camera location wherever you want and add that information on screen. edit: actually nvm, you will have to make completly custom ban system seprate from MTA's built-in. Code pls Link to comment
Fist Posted February 22, 2017 Share Posted February 22, 2017 (edited) 16 minutes ago, Lorder said: Code pls Found exact topic which is like your's with some code (maybe it has all code in it not sure) check it maybe it works Edited February 22, 2017 by Fist Link to comment
Lorder Posted February 22, 2017 Author Share Posted February 22, 2017 I did not understand Link to comment
xeon17 Posted February 22, 2017 Share Posted February 22, 2017 You can't cancel onPlayerJoin. Just show him the ban hud instead of the login if he's banned. Link to comment
MTA Anti-Cheat Team Dutchman101 Posted February 23, 2017 MTA Anti-Cheat Team Share Posted February 23, 2017 (edited) On 2017-2-22 at 09:57, Fist said: you will have to make completly custom ban system seprate from MTA's built-in. The goal should then be preventing the player from doing anything useful on your server such as playing, giving them nothing to interact with as that matches the purpose of a ban. So then, any resource from A to Z making part of your gamemode should be intercepted if the player is ''banned'' through this system, aka from the chat to spawning should be cancelled/disabled if the ''banned'' player is listed in your script's ban data storage. So the principle isnt all that complicated, just add a check on all existing scripts that give interactive experience, or spawning as player, if their serial is listed they are 'banned' and you just draw them the screen showing ban details and acknownledgement they are banned. Don't give them anything but that and they can just idle and stare at their fate. Spawning them inside a jail and taking away any interaction or usage of scripts can be an alternative that comes down to the same, if you're looking for a replacement of the MTA ban system with something like this. Edited February 23, 2017 by Dutchman101 1 Link to comment
ManeXi Posted February 23, 2017 Share Posted February 23, 2017 (edited) You have no idea of how diffucult can be doing this for a starter, before asking very complex stuff like this I strongly recommend you to get some knowledge about doing very basic scripts and programming, learn basics like using; if conditioning, for loops, tables and variables and you'll snowball to the knowledge of scripting in less time than you think. Edited February 23, 2017 by ManeXi Link to comment
Fist Posted February 24, 2017 Share Posted February 24, 2017 12 hours ago, Dutchman101 said: The goal should then be preventing the player from doing anything useful on your server such as playing, giving them nothing to interact with as that matches the purpose of a ban. So then, any resource from A to Z making part of your gamemode should be intercepted if the player is ''banned'' through this system, aka from the chat to spawning should be cancelled/disabled if the ''banned'' player is listed in your script's ban data storage. So the principle isnt all that complicated, just add a check on all existing scripts that give interactive experience, or spawning as player, if their serial is listed they are 'banned' and you just draw them the screen showing ban details and acknownledgement they are banned. Don't give them anything but that and they can just idle and stare at their fate. Spawning them inside a jail and taking away any interaction or usage of scripts can be an alternative that comes down to the same, if you're looking for a replacement of the MTA ban system with something like this. yeah, but is it possible to cancel kick on player joins if he's banned? If so then it's not that complicated. Link to comment
^iiEcoo'x_) Posted February 24, 2017 Share Posted February 24, 2017 setElementData ( source , "setPlayerBan", true ) Use This In Code Ban The Player , Change Source To Definition The Player , Save The Data In SQL And Save On Serial , The Code For Close Key If His Data , buttons = { ['F1'] = true, ['F2'] = true, ['F3'] = true, ['F4'] = true, ['F5'] = true, ['F6'] = true, ['F7'] = true, ['F8'] = true, ['F9'] = true, ['J'] = true, ['T'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementData(localPlayer,"setPlayerBan") == true then if buttons[button] then cancelEvent() end end end) If Not Bind Key F8 , The Code For Cancel Your Command In F8 , local Cmd = { "showchat" , "register" , "login" ) addEventHandler("onPlayerCommand", root, function( cmd ) for _,v in iprise ( Cmd ) do if cmd == v then cancelEvent() end end end) Link to comment
MTA Anti-Cheat Team Dutchman101 Posted February 24, 2017 MTA Anti-Cheat Team Share Posted February 24, 2017 (edited) 13 hours ago, Fist said: yeah, but is it possible to cancel kick on player joins if he's banned? You're completely on the wrong track, TS is not asking to cancel a ban-''kick'' when the ban system got that player as banned, nor if you meant to cancel-kick joins (I wouldnt be surprised if you mean this as your other comments also make little sense) as he wants the players to persist while drawing that information screen about ban details. I've read your other replies in here and I don't think its really contributing Edited February 24, 2017 by Dutchman101 1 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