Jump to content
Thang

Disallow cuffed players to jump out of a cruiser

Recommended Posts

Posted

Essentially my suggestion is to disallow players who are cuffed to jump out of a cruiser unless the door is open. This is based on reality as there is no way to open the backseat door of cruisers from inside.

I understand the counterargument  would be that people could simply RP it and many people do. There are some who don't and they might just not know about it and this would prevent the OOC arguments the law enforcement sometimes need to have with their suspects about this. 

Also this suggestion doesn't prevent criminals helping their friend out of the cruiser as the cuffed person can get out of the cruiser if their friend opens the door for them from outside.

 I don't like to suggest impossible things, so I played a little bit and came up with this working code, which does what my suggestion suggests: 

function isLocalPlayerCuffed() { // Placeholder function
  return true;
}

function isPoliceVehicle(vehicle) { // Placerholder function
    return true;
}

mp.events.add('render', () => {
    var playerVeh = mp.players.local.vehicle;
    var localPlayer = mp.players.local;
    if(!playerVeh || !isLocalPlayerCuffed() || !isPoliceVehicle(playerVeh))
        return;
    var playerSeat = 0;
    var maxPassengers = playerVeh.getMaxNumberOfPassengers();
    for(i = 0; i < maxPassengers; i++) {
        if(playerVeh.getPedInSeat(i) == localPlayer.handle) {
            playerSeat = i + 1;
            break;
        }
    }
    if(playerVeh.getDoorAngleRatio(playerSeat) < 0.1) {
        mp.game.controls.disableControlAction(0, 75, true);
    }
});

 

  • Like 1
  • Upvote 1
Posted

I believe the script should stay as it is. Did you consider the fact that other people can open the door for them or break the window for them to get out? If they want to get out while the cruiser is moving, warn them. If they do it again, report them.

Posted
On 8/25/2021 at 4:48 PM, TheCactus said:

I believe the script should stay as it is. Did you consider the fact that other people can open the door for them or break the window for them to get out? If they want to get out while the cruiser is moving, warn them. If they do it again, report them.

It takes into consideration open doors. So if their friend opens a door for them, they can get out.

  • Like 1
Posted (edited)

I get why this would greatly help police encounters with players not understanding the rules of being handcuffed while in a cruiser but it could potentially change the outcome of a rp scenario. Lets say a player is stuck in a locked cop car and handcuffed the only way to get them out is for the car to be unlocked if there is no police officers around there is no way of quickly getting the vehicle unlocked. Currently with how the script works now instead of having to try to picklock a police car which could take a large amount of time. Players could rply smash the window with a large rock, gun or whatever they could realistically smash a car window with. Such as /me grabs a brick and repeatedly smashes the window until it shatters. Then the 2 players could rp climbing out of the vehicle with the final action of the player inside of the vehicle pressing F and getting out of it. Your idea all though it is a great idea it would not allow for this type of scenario to play out and could potentially ruin the experience of the arrested party. 

Edited by Symere
Posted
On 11/5/2021 at 8:30 AM, Symere said:

I get why this would greatly help police encounters with players not understanding the rules of being handcuffed while in a cruiser but it could potentially change the outcome of a rp scenario. Lets say a player is stuck in a locked cop car and handcuffed the only way to get them out is for the car to be unlocked if there is no police officers around there is no way of quickly getting the vehicle unlocked. Currently with how the script works now instead of having to try to picklock a police car which could take a large amount of time. Players could rply smash the window with a large rock, gun or whatever they could realistically smash a car window with. Such as /me grabs a brick and repeatedly smashes the window until it shatters. Then the 2 players could rp climbing out of the vehicle with the final action of the player inside of the vehicle pressing F and getting out of it. Your idea all though it is a great idea it would not allow for this type of scenario to play out and could potentially ruin the experience of the arrested party. 

I would like to point out that if the rp of smashing the window was practical, firstly cruisers have cages in their back seats (bars on windows) secondly if that is the logic for getting someone out of the car, why is that RP not appropriate for stealing a car, or cops trying to search one.... we are forced to rply get keys, or picklock the cars. 
Smashing to gain access has been consider alternative rp thus isn't accepted without expressed permissions. (Run into this trying to search a non complaint/rp friendly players car)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and our Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.