Author Topic: Improve Passenger Vehicle Entry  (Read 6651 times)

Offline PacoBeanZ

  • VIP
  • Newbie
  • **
  • Posts: 17
  • Rank: Unknown
  • Score: Unknown
Improve Passenger Vehicle Entry
« on: June 04, 2018, 06:59:37 am »
Hi,

I'd like to suggest to improve the poor design for passenger entry into vehicles. The functionality that prevents "passenger drive-by without a driver" is negatively impacting passenger entry.

Issues:
  • If a passenger attempts entry before the driver, then the passenger is kicked out of the vehicle until he enters a vehicle with a driver
  • If a driver exits the vehicle, then all passengers are kicked

There are more elegant solutions to avoid the passenger drive-by abuse.

Possible solutions:
  • On passenger entry, switch to melee weapon slot if a driver isn't present. If a driver is present, retain the current weapon slot. If a driver exits the vehicle for any reason (pressing f, disconnecting from the server, or teleportation - via being jailed or admin spectate) then all passengers inside of the vehicle will have their weapon slots switched to melee. However, I'm not sure how the passenger manually pressing g will be handled. There is no state for passenger drive-by: http://wiki.sa-mp.com/wiki/State
    You could possibly detect player driveby animations but that looks inefficient based on the amount of animations you'll have to cover: http://wiki.sa-mp.com/wiki/Animations
  • On passenger entry, remove all of the passenger's weapon and store it on memory if a driver isn't present. If a driver enters a vehicle with passengers, all passenger weapons will be restored to their previous ammo. If a passenger enters with a driver present, retain the current passenger weapon slot and do not save passenger weapons. If a driver exits the vehicle for any reason (pressing f, disconnecting from the server, or teleportation - via being jailed or admin spectate) then all passengers inside of the vehicle will have their weapons removed and stored on memory.

I honestly think the 2nd solution is a better since you could also expand upon it and add anti cheat detection (for instance, if a player generates weapon ammo when they're a passenger with no driver then execute -something-). Forced vehicle kick should be removed entirely.

This was written hastily so tell me if there are any missing use cases.

Offline Maddy

  • VIP
  • Hero Member
  • **
  • Posts: 795
  • Rank: Loc
  • Score: 37297
  • My attitude depends on the people in front of me.
Re: Improve Passenger Vehicle Entry
« Reply #1 on: June 04, 2018, 07:18:07 am »
It can be easily abused suppose if a President in North San Andreas map tries to dodge a hydra, he/she can easily enter any vehicle as passenger and the hydra missiles will not effect his/her health as the explosion makes no damage to the passenger. Moreover, if a terror is shooting with a spas as a passenger it will too over powered and will be very difficult for securities to kill the terror because the explosion of any vehicle is very easy with a driver as compare to trying to burst a passenger's vehicle. He/she can instantly escape from such situation giving a big damage to the opponent.
-1


Offline Madman

  • VIP
  • Hero Member
  • **
  • Posts: 1483
  • Rank: Shooter
  • Score: 56402
Re: Improve Passenger Vehicle Entry
« Reply #2 on: June 04, 2018, 07:38:35 am »
-1
menace> {33CCFF}[4] {FFFFFF}SMALL PENIS IRAN DOGS
menace> {33CCFF}[4] {FFFFFF}SMALL PENIS IRAN DOGS
Dr.MaDMaN[GgT]> {33CCFF}[3] {FFFFFF}Retarded mode is on
DedeceK> {33CCFF}[27] {FFFFFF}LOL
DedeceK> {33CCFF}[27] {FFFFFF}madman he wanan mute again

Offline PacoBeanZ

  • VIP
  • Newbie
  • **
  • Posts: 17
  • Rank: Unknown
  • Score: Unknown
Re: Improve Passenger Vehicle Entry
« Reply #3 on: June 04, 2018, 07:39:24 am »
Moreover, if a terror is shooting with a spas as a passenger it will too over powered and will be very difficult for securities to kill the terror because the explosion of any vehicle is very easy with a driver as compare to trying to burst a passenger's vehicle. He/she can instantly escape from such situation giving a big damage to the opponent.
The solution mitigates against passenger drive by without a driver, that wont be possible.

It can be easily abused suppose if a President in North San Andreas map tries to dodge a hydra, he/she can easily enter any vehicle as passenger and the hydra missiles will not effect his/her health as the explosion makes no damage to the passenger.
I haven't taken NSA into account since I rarely use hydras and normally dont like to stay on the server when it switches to that map. It's good that you've brought it up.

There should probably be a check if the map is NSA then the current passenger will switch to the driver if the driver leaves the vehicle. We could explore more options with this

UPDATE:
I did some digging around and there are an overwhelming amount of scripts that deal with unoccupied vehicle damage. To say that this is a problem is really reaching.

randomly selected scripts (THERE ARE MUCH MORE!):
Unoccupied Vehicle Damage[NEW]
OnPlayerVehicleDamage
OnEmptyVehicleDamage
Vehicle Killer

a neat callback that does "magic"
http://wiki.sa-mp.com/wiki/OnUnoccupiedVehicleUpdate

I think R0's solution is pretty cool since it avoid the above callback entirely. In practice, idk how it fairs.
« Last Edit: June 04, 2018, 08:15:04 am by PacoBeanZ »

Offline Deadman

  • VIP
  • Hero Member
  • **
  • Posts: 1087
  • Rank: Shooter
  • Score: 64003
  • Pure Striker
Re: Improve Passenger Vehicle Entry
« Reply #4 on: June 04, 2018, 09:55:12 am »
It can be easily abused suppose if a President in North San Andreas map tries to dodge a hydra, he/she can easily enter any vehicle as passenger and the hydra missiles will not effect his/her health as the explosion makes no damage to the passenger. Moreover, if a terror is shooting with a spas as a passenger it will too over powered and will be very difficult for securities to kill the terror because the explosion of any vehicle is very easy with a driver as compare to trying to burst a passenger's vehicle. He/she can instantly escape from such situation giving a big damage to the opponent.
-1
This feature suits on Roleplay an Pilots life server (currently they have it). So -1

Offline Saurabh

  • VIP
  • Hero Member
  • **
  • Posts: 526
  • Rank: Unknown
  • Score: Unknown
Re: Improve Passenger Vehicle Entry
« Reply #5 on: June 04, 2018, 04:53:22 pm »
+1. The vehicle entry kick gets so annoying.

Your 2nd solution + that Ro guy's script should work well.

Offline SaiFi

  • VIP
  • Hero Member
  • **
  • Posts: 752
  • Rank: Foot Soldier
  • Score: 95932
  • What's fame, When I rule the fuckin game
Re: Improve Passenger Vehicle Entry
« Reply #6 on: June 08, 2018, 11:39:37 am »
+1

Offline Zeta

  • VIP
  • Hero Member
  • **
  • Posts: 1265
  • Rank: Soldier
  • Score: 141542
Re: Improve Passenger Vehicle Entry
« Reply #7 on: June 09, 2018, 07:01:55 am »
Nope
-1

Offline FlapJack[M.I.B]

  • VIP
  • Sr. Member
  • **
  • Posts: 317
  • Rank: Unknown
  • Score: Unknown
  • FUCK LIKE THERE'S NO TOMORROW
Re: Improve Passenger Vehicle Entry
« Reply #8 on: June 09, 2018, 07:23:14 am »
I don't think that's really needed although it really is annoying.

-1


Offline Aztrek

  • VIP
  • Full Member
  • **
  • Posts: 124
  • Rank: Unknown
  • Score: Unknown
  • Trust begets nothing
Re: Improve Passenger Vehicle Entry
« Reply #9 on: June 09, 2018, 03:15:39 pm »
-1
There should be some good reasons of -1 ^_^

Offline Cyrus_

  • VIP
  • Full Member
  • **
  • Posts: 116
  • Rank: Hard-ass
  • Score: 26973
  • ThuG 4 Life
    • ThuG : True Heroes Under God
Re: Improve Passenger Vehicle Entry
« Reply #10 on: June 13, 2018, 07:28:25 pm »
-1
⭐⭐✪✪✪✪✪✪✪✪✪✪✪ Lil Thug ✪✪✪✪✪✪✪✪✪✪⭐⭐
[/cen

Offline LPCOLTER

  • VIP
  • Hero Member
  • **
  • Posts: 1367
  • Rank: Transformer
  • Score: 1832
  • Of course it's me.
Re: Improve Passenger Vehicle Entry
« Reply #11 on: June 14, 2018, 07:13:53 am »
+1. The vehicle entry kick gets so annoying.

Your 2nd solution + that Ro guy's script should work well.

Offline Altus_Demens

  • Admin
  • Hero Member
  • ****
  • Posts: 1119
  • Rank: Hoodsta
  • Score: 23951
Re: Improve Passenger Vehicle Entry
« Reply #12 on: June 14, 2018, 12:44:36 pm »
Could you explain why does the auto kick annoy you?
In other words, right now I don't think that spending time for all that scripting is worth it.

  • On passenger entry, switch to melee weapon slot if a driver isn't present. If a driver is present, retain the current weapon slot. If a driver exits the vehicle for any reason (pressing f, disconnecting from the server, or teleportation - via being jailed or admin spectate) then all passengers inside of the vehicle will have their weapon slots switched to melee. However, I'm not sure how the passenger manually pressing g will be handled. There is no state for passenger drive-by: http://wiki.sa-mp.com/wiki/State
    You could possibly detect player driveby animations but that looks inefficient based on the amount of animations you'll have to cover: http://wiki.sa-mp.com/wiki/Animations
As far as I remember, OnPlayerStateChange does the job, there is PLAYER_STATE_PASSENGER.
A paltry man and poor of mind
At all things ever mocks;
For never he knows, what he ought to know,
That he is not free from faults.

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1927
  • Rank: Chump
  • Score: 3751
Re: Improve Passenger Vehicle Entry
« Reply #13 on: December 06, 2018, 09:22:48 pm »
As Altus mentioned, it would take a lot of scripting time, and probably come with a lot of unforeseen issues, so I don't think it's a good idea to add this.