Plan B
General => Suggestions => Closed => Topic started by: PacoBeanZ 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.
-
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
-
-1
-
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] (http://forum.sa-mp.com/showthread.php?t=521010)
OnPlayerVehicleDamage (http://forum.sa-mp.com/showthread.php?t=276059)
OnEmptyVehicleDamage (http://forum.sa-mp.com/showthread.php?t=271903)
Vehicle Killer (http://forum.sa-mp.com/showthread.php?t=274402l)
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.
-
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
-
+1. The vehicle entry kick gets so annoying.
Your 2nd solution + that Ro guy's script should work well.
-
+1
-
Nope
-1
-
I don't think that's really needed although it really is annoying.
-1
-
-1
There should be some good reasons of -1 ^_^
-
-1
-
+1. The vehicle entry kick gets so annoying.
Your 2nd solution + that Ro guy's script should work well.
-
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.
-
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.