Quote:
Originally Posted by BeckzyBoi
This really needs fixing. You can destroy unoccupied vehicles if you're wearing a parachute. AFAIK there is no scriptable solution for this.
|
Actually there is a solution but it again makes us have useless pieces of code in our game modes.
Under OnPlayerKeyStateChange check if player presses the fire key (attack key), check if he has a parachute, check if he is near any vehicle (since vehicles have different shapes make the check distance longer), usually done looping thru all vehicles on the server, getting vehicle pos and using IsPlayerInRageOfPoint. Once the loop returns a specific vehicleid, you could check if there is a driver inside it to make it possible to crash an occupied vehicle without applying your fix.
After that it's up to you what you want to do with the parachute, you could remove it from a player, set a timer and give it back after a while, you could completely remove it etc and also you could set back the vehicles health if for example it had low hp and with one possible hit, before the code to work the player crashed it, it would go on fire so setting it's health back would prevent it.
Don't know if there are any other methods, just reassuring you that you could fix that bug yourself if you need it in the meantime.