Transfender, Low Co. and Arch Wheel Angels Bug
#1

Hi there,

Whenever a players connection times out while they're modding their vehicle, when they reconnect they will have the menu still open.

If for example a server uses 'OnVehicleMod' and checks if the modder is in interior 0, it will ban them, thinking they're using cheats.

I have trailed and tested this method and confirmed it before posting here.
Reply
#2

Hmmm , can you explain more, can't understand ?
Veh mod ? ban them ? why
Reply
#3

Maybe try showing and hiding a menu when a play connects
ShowMenuForPlayer
Reply
#4

Same as dialogs.
Reply
#5

Quote:
Originally Posted by ItzzWesty
Посмотреть сообщение
Hmmm , can you explain more, can't understand ?
Veh mod ? ban them ? why
I'm not the OP, but his explanation was clear. If someone disconnects while modding a vehicle and then reconnects, the menu for modding will have never formally been closed and thus remain open. Since that menu is open, Kyle's gamemode considers the person to be modding their vehicle; however, that person isn't in the proper interior and so the gamemode believes that the person is cheating.

To the OP: Perhaps one hack-y solution would be to treat the OnPlayerDisconnect callback like a destructor would be used in several OOP languages. You could try to close all menus and/or dialogs which were left open by the player, so that (s)he won't be banned upon immediate connection.

Another approach would be to consider whether or not the player has spawned yet, and if (s)he hasn't then the script won't ban him (or her).
Reply
#6

Quote:
Originally Posted by DiverseCardinal
Посмотреть сообщение
I'm not the OP, but his explanation was clear. If someone disconnects while modding a vehicle and then reconnects, the menu for modding will have never formally been closed and thus remain open. Since that menu is open, Kyle's gamemode considers the person to be modding their vehicle; however, that person isn't in the proper interior and so the gamemode believes that the person is cheating.

To the OP: Perhaps one hack-y solution would be to treat the OnPlayerDisconnect callback like a destructor would be used in several OOP languages. You could try to close all menus and/or dialogs which were left open by the player, so that (s)he won't be banned upon immediate connection.

Another approach would be to consider whether or not the player has spawned yet, and if (s)he hasn't then the script won't ban him (or her).
Tried your first idea before, doesn't fix it.

Also, as for the second, they'll spawn, enter a vehicle, and use the menu to mod it. They don't get banned instantly, it's when they use the menu.
Reply
#7

Quote:
Originally Posted by DiverseCardinal
Посмотреть сообщение
To the OP: Perhaps one hack-y solution would be to treat the OnPlayerDisconnect callback like a destructor would be used in several OOP languages. You could try to close all menus and/or dialogs which were left open by the player, so that (s)he won't be banned upon immediate connection.
Sadly this won't work because the player would already be disconnected when this callback gets called.
Wiki:
Quote:

Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIP and GetPlayerPos.

Reply
#8

Closing the menu on Disconnect is pointless because this only happens for connection timeouts, so when the server notices it the connection isnt existing anymore.
Also you can only close specific Menus, so it's not possible to close a client-sided menu.

Your best bet is checking if the player was in a modshop and then lost connection. Then you can show a warning message to the player when he reconnects, which tells him to press F and that abusing this bug is not tolerated. Or put him back in a vehicle and teleport him into a modshop.
Reply
#9

Sorry, I know this is old. But I wanted to let you know how I fixed this bug within my script.

Inside onplayerdisconnect I log the reason.
If the reason was a timeout, I save it in my sql table.

I have a variable at the top of my script called noban.

Inside onplayerconnect, before anything else happens, I look to see if the field "timeout" = 1.
If so, I set the field to 0, toggle noban for the player to 1. In my cheat detection area, if noban > 0 it does nothing, therefore they won't get banned.

Then I send them a message telling them they need to press f to continue. Once that is done, I toggle them controllable, set noban to 0, and then the script resumes as if they just logged in as normal.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)