solidsnake Posted February 6, 2010 Share Posted February 6, 2010 hello all .... strange thing happen yesterday i can't kick\ban this guy : (DBLEO..\..W) when i ban him it shows me this : $player has been banned by SolidSnake i did that many times btw he have MTA 1.0 & i have MTA 1.0.3 Link to comment
0 robhol Posted February 6, 2010 Share Posted February 6, 2010 Try updating the admin resource? Or is this some custom script? If so, that's most likely where the mistake is located AND we can't help you unless you post it. In the highly unlikely event that this is caused by some bug related to different versions, you should be able to detect the version and block people with "too old" version using onPlayerConnect in conjunction with cancelEvent. Link to comment
0 solidsnake Posted February 6, 2010 Author Share Posted February 6, 2010 Try updating the admin resource? Or is this some custom script? If so, that's most likely where the mistake is located AND we can't help you unless you post it.In the highly unlikely event that this is caused by some bug related to different versions, you should be able to detect the version and block people with "too old" version using onPlayerConnect in conjunction with cancelEvent. Thanks for reply ... its is same Admin script that come with MTA 1.0.3 resource without modify or touch anything ...BTW this guy also cant be banned in another server & that server used MTA SERVER 1.0.3 !!! Link to comment
0 robhol Posted February 6, 2010 Share Posted February 6, 2010 So try updating the admin resource from the resources SVN at Google Code. I'm not completely sure, but I do vaguely recall hearing about a problem where the admin panel fails at banning people because of certain symbols in a player name. I just hope that was in a change note. Link to comment
0 Gamesnert Posted February 6, 2010 Share Posted February 6, 2010 I also think it's in the name indeed. It smells like pure ban evasion. I recommend you to update admin with the one from here: http://multitheftauto-resources.googlec ... s-r514.zip These are newer than the 1.0.3 resources. Try to set your name to that name that wasn't bannable, and try to kick / ban yourself. If it still doesn't work, I recommend either finding out what in the name breaks it and reporting it, or just create a separate resource for the banning. (which doesn't rely on names) Link to comment
0 solidsnake Posted February 6, 2010 Author Share Posted February 6, 2010 So try updating the admin resource from the resources SVN at Google Code.I'm not completely sure, but I do vaguely recall hearing about a problem where the admin panel fails at banning people because of certain symbols in a player name. I just hope that was in a change note. Thanks ... i hope so Link to comment
0 solidsnake Posted February 7, 2010 Author Share Posted February 7, 2010 I also think it's in the name indeed. It smells like pure ban evasion.I recommend you to update admin with the one from here: http://multitheftauto-resources.googlec ... s-r514.zip These are newer than the 1.0.3 resources. Try to set your name to that name that wasn't bannable, and try to kick / ban yourself. If it still doesn't work, I recommend either finding out what in the name breaks it and reporting it, or just create a separate resource for the banning. (which doesn't rely on names) Great ... i have good idea ..by ID number but players with names not by id numbers if i can make that maybe work But i dont know how Link to comment
0 Gamesnert Posted February 7, 2010 Share Posted February 7, 2010 You can make a small and simple ID system with a few things in mind: - Showing the ID of the player on the scoreboard - The script has to be able to convert an ID into a player and ban him For ID generation, you can something as simple as a table: local playerIDs = {} function givePlayerID(player) local ID = #playerIDs + 1 -- This means that if there's nothing in the table, you'll get the table index count (0) + 1 = 1 playerIDs[ID] = player -- Add the player to the table -- MORE TO BE ADDED end addEventHandler("onPlayerJoin",getRootElement(),function() givePlayerID(source) end) -- Make sure the function is triggered whenever someone joins Now you have an ID system as basic as it can get. Problem is, you don't even know who has got what ID. To solve this, you have to show it in: - His nametag - Scoreboard Or both. For scoreboard implementation, see the scoreboard page on the wiki. For the use of nametags, you can use setPlayerNametagText and set the nametag to something like: (1) Gamesnert([iD]) [Player name] The functions should be used inside the givePlayerID function I've mentioned earlier. It's best that you add them yourself, we're not here to do everything for you. Now we've got a problem: We can now give players IDs, well... whoop-dee-doo... But MTA doesn't know what to do with them. Therefore, "/ban 1" will still do absolutely nothing. Let's change that by adding a ban function: -- (NOTE: If a player has quit / banned, his ID will still remain occupied, and joining players will constantly get higher IDs) function banPlayerByID(ID) local player = playerIDs[ID] if player then -- If there's a player with the given ID local IP = getPlayerIP(player) -- We need to get the player's IP to ban him, since addBan either needs IP, Username or Serial. However, of those only IP actually works local success = addBan(IP,nil,nil) if success then outputChatBox("Bye bye sucker",getRootElement(),0,255,0) else outputChatBox("oshi",getRootElement(),255,0,0) end end end addCommandHandler("banid",function(player, cmd, ID) banPlayerByID(tonumber(ID)) end) One last thing remaining: Resources don't have the right to get the player's IP or ban him by default. To fix this, give the resource rights to: - getPlayerIP - addBan If you did the displaying correctly, then well hooray, it should work! Note that this script is for example purposes, which means it probably lacks major features. If you want things added, you should do it yourself (mostly) and mainly you should learn from this script, not just copy & forget. Also, I didn't test the script. I've never written something like this before and am therefore not 100% sure it'll work, but my guess is that it will. Hope it helps you get on your way a bit. Link to comment
Question
solidsnake
hello all .... strange thing happen yesterday i can't kick\ban this guy : (DBLEO..\..W)
when i ban him it shows me this : $player has been banned by SolidSnake
i did that many times 
btw he have MTA 1.0 & i have MTA 1.0.3
Link to comment
7 answers to this question
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