Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
MP2 - 23.06.2012
UPDATE: Fixed a couple of issues:
Issue #1: If you run a player over and while down they press G, OnPlayerEnterVehicle isn't called but after getting up they start to enter the vehicle. This would allow them to bypass this system, so I now detect if their special action is SPECIAL_ACTION_ENTER_VEHICLE under OnPlayerUpdate. Fixed.
Issue #2: To detect when a player starts to step in to a vehicle I detect if their velocity is 0 and their special action is SPECIAL_ACTION_ENTER_VEHICLE. It works but under specific timing conditions it may think you're stepping in when you START to run to a vehicle (when OnPlayerEnterVehicle is called) - this is now fixed by 'confirming' this event with GetTickCount. Fixed.
EDIT: Update #2: Fixed a bug where if a player entered a vehicle as a passenger but it took a while, for example he may have to run around the vehicle to get to the door on the other side, he would teleport inside and be denied entry. If the vehicle doesn't move more than 2* meters when he finally gets in, entry is now granted.
* Configurable via define in include. 2 by default. I don't recommend more than 4.
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
Shelby - 23.06.2012
Very nice! I've lol at 0:38.
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
bgmrk - 23.06.2012
Nice MP2!
Respuesta: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
rscaerzx - 24.06.2012
wow thanks a lot!
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
DonWade - 24.06.2012
Thas bug is most the annoying one for me.. Good job
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
Rube - 25.06.2012
Good job
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
Lordzy - 25.06.2012
Good JoB!
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
MP2 - 25.06.2012
Quote:
Originally Posted by ******
Why not detect if they are running after a car and make them give up, rather than waiting for them to enter the vehicle then remove them again? What happens if there's already a passenger in the vehicle given that they will still warp in currently?
|
First of all could you clarify on 'What happens if there's already a passenger in the vehicle given that they will still warp in currently?' because I don't understand.
As for why I use this method, using a 3 second timer then failing their entry will fail most of the time due to:
1. Lag - A player starts to enter a vehicle and an un-threaded mySQL gets sent on the server, the server hangs for roughly a second - they warp in and the server doesn't detect it because they're already in.
2. Doors - Say you have a Stretch and there's 2 passengers in, one in the front passenger seat and one in the back. If you stand at the front of the bonnet and press G it will take more than 3 seconds (if not sprinting) to reach the door - causing them to warp in. I know this can be fixed by them standing at a door THEN press G, but it would piss players off.
3. They could spam G and run after it long enough to be warped in, cancelling out the timer thing
4. This is what Crazybob does, so it's not that bad.
Don't get the impression I don't like your feedback - I always look forward to your feedback because you're honest, direct and give constructive criticism. It's okay people saying 'WELL DONE GOOD WORK!!!!' but the best comments are always the criticisms - it helps you get better.
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
StreetGT - 25.06.2012
i made a little thing that protected too, but it's possible to make the bug.
i used:
pawn Code:
if(ispassenger)
{
new Float:dx,Float:dy,Float:dz,Float:velo;
GetPlayerPos(playerid,dx,dy,dz);
new Float:vx,Float:vy,Float:vz;
GetVehicleVelocity(vehicleid,vx,vy,vz);
velo = floatround(floatsqroot(((vx*vx)+(vy*vy))+(vz*vz))*156.666667);
if(GetDistBetweenVehiclePlayer(vehicleid,playerid) > 3 && velo >= 1.0)
{
SetPlayerPos(playerid, dx,dy,dz);
}
}
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
Y_Less - 25.06.2012
Quote:
Originally Posted by MP2
First of all could you clarify on 'What happens if there's already a passenger in the vehicle given that they will still warp in currently?' because I don't understand.
|
If a 4-seat car is full, then I try get in and warp in to it, what happens?
Quote:
Originally Posted by MP2
As for why I use this method, using a 3 second timer then failing their entry will fail most of the time due to:
...
|
Check the distance the car has moved.
Quote:
Originally Posted by MP2
4. This is what Crazybob does, so it's not that bad.
|
Fair enough.
Quote:
Originally Posted by MP2
Don't get the impression I don't like your feedback - I always look forward to your feedback because you're honest, direct and give constructive criticism. It's okay people saying 'WELL DONE GOOD WORK!!!!' but the best comments are always the criticisms - it helps you get better.
|
Good, these things are good, so I will say nice work too.
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
MP2 - 25.06.2012
Quote:
Originally Posted by ******
If a 4-seat car is full, then I try get in and warp in to it, what happens?
|
Do you mean in SA:MP or with this include? Nothing happens with either, but OnPlayerEnterVehicle is still called.
Thanks.
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
punklord - 04.03.2013
Very nice,brilliant idea for you to ruin us who want a free ride.
Keeping it on-topic: Keep them up.
Re : gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
DaTa[X] - 04.03.2013
i was looking for this thanks !
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
iFear - 06.03.2013
Very good Work!
It's the thing that SAMP Needs for years..
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
RenovanZ - 08.03.2013
Very Nice Release bro!!
Thanks!
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
-CyRAX - 08.03.2013
This is good job..
Thanks!
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
JaKe Elite - 10.03.2013
Nice job i like it.
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
iFox - 10.03.2013
this inc bug textdrawn in game mode ppc trucking
Re: gBug - Prevent 'the G bug' - prevents players teleporting into passenger seat -
JaKe Elite - 10.03.2013
^^
actually you installed it wrong. It works fine for me.