Jump to content

[REL] Legal System for RPG or FreeRoam servers


Slothman

Recommended Posts

Posted

NAdd a little order to the chaos of mta! This script creates an entire legal system to gameplay, great for RPG servers! Players who are acting as police can catch other players who commit crimes. The criminal is then forced to follow the cop to the nearest police cruiser where they will be driven to jail to serve their time. Players being arrested have no control over their character and have no choice but to watch as they are hauled off to prison!

https://community.multitheftauto.com/index.php?p=resources&s=details&id=292

Features incude:

*Police have ability to arrest people with wanted levels in 3 ways:

- smacking them with a nightstick

- pulling them out of a car

- aiming a weapon at close range (if criminals health is low)

*Increase wanted levels when players break the law in these ways:

- Jacking a car

- Killing a player (cops get wanted for killing innocents)

- Stealing a Cop car

- Assaulting an officer

- Being seen by a cop doing illegal activity (read further for details)

*Players have to serve jailtime if arrested (jailtime per wanted star is a server variable)

*Cops get rewarded for arresting or klling criminals (rewards are server variables)

*Players can be freed by friends if they intercept the arrest

*Made to be modular to work with almost any existing rpg servers

-Works by detecting players skins

-Doesn't alter Team assignments

-Doesn't rely on a specific spawning system

*Police can arrest up to 2 players at once

*Works With Police Bribe Pickups

*creates directions to jails for arresting officer

*creates blips of players with wanted levels in the map

To Make it so the police can detect a player is doing something illegal in your own script, simply assign elementdata to the player "legalstatus" "illegal" while they are doing something illegal.

(eg: if you have a script where a player is street racing, set the participant's elementdata while the race is happening. if a policeman sees the player while this is set, the player will get a wanted star). Don't forget to set the elementdata back to nil when the illegal activity is over though!.

Questions or comments welcome!

Posted

And why not for dp 2.3?

Because you quote a freaking big post for absolutely no reason...

Back on-topic:

Seems like a pretty cool resource! About time someone would make a nice police resource for RPG servers, so servers might concider increasing police RPG qualities.

Posted

the reason dp 2.3 doesnt work is the code that forces a criminal to follow a cop around doesnt operate properly, i couldnt force the camera direction of the player to make sure they face the direction i want.

Posted (edited)
the reason dp 2.3 doesnt work is the code that forces a criminal to follow a cop around doesnt operate properly, i couldnt force the camera direction of the player to make sure they face the direction i want.

:(

Edited by Guest
Posted

Or better yet, you could start using nightlys, because that's kind of the most meaningful thing to do for scripters and '"scripters".

Posted

i suppose you could eliminate the coolest part of the script and do something like glue the player to the cop till he gets in the car. but that not nearly as fun. feel free to give it a shot.

Posted (edited)
i suppose you could eliminate the coolest part of the script and do something like glue the player to the cop till he gets in the car. but that not nearly as fun. feel free to give it a shot.

Ok :fadein:

Edited by Guest
Posted

youll see that all the functions in the script is marked out, i try to make all my scripts user friendly and intuitive as possible. theres one function that forces the captured player to face the cop, you could replace it with a glueing the player to make them follow the cop, and leave all other aspects alone. you might need to unglue once the car is reached before it forces the player in the car though.

cant explain it more than that without doing it all myself :wink:

Posted
youll see that all the functions in the script is marked out, i try to make all my scripts user friendly and intuitive as possible. theres one function that forces the captured player to face the cop, you could replace it with a glueing the player to make them follow the cop, and leave all other aspects alone. you might need to unglue once the car is reached before it forces the player in the car though.

cant explain it more than that without doing it all myself :wink:

And can you just let follow him the cop in DP2.3?

And just replace getElementModel with getPlayerSkin

and replace Ped with Player.

That would be hard, but what do you mean with face the cop?

Posted

yeh sloth we had issues with out script in dp2 trying to get the whole arrest thing to work. keep it for 1.0 don't let these noobs ruin your work ;)

nice job btw.

Posted

ty. this was actually a script i had mostly built a long time ago before the public nightlies. just kinda sat unfinished, unreleased, and forgotten for a while, then i remembered it, did a bit of polishing, and sent it out the door.

  • 4 months later...
Posted
yay, and unto the world the Slothman delivered an update, and it was good. and the people rejoiced
- from The Book of Sloth

That's right, a new update, that fixed all the small things that kept this script from perfection!

-fixed debug errors

-fixed police markers

-added more police vehicles

-fixed wanted blips

**- added ability to choose how the script tells whos a cop, either by a table of skins, or by teamname. this is all set on the fly with server variables! (detects cops on spawn)

-many many other bug fixes.

Anyhow, just download it HERE then rate and comment. and if you find a bug, no matter how minor, please report it in this thread or somewhere i will see it. not only will I try to fix it, but it'll also deflate my ego, which is good for everyone.

  • 4 weeks later...
Posted

Been a while, Sloth... I apologize for my absence, but work > MTA. I love what you've done with the script, much better team system than my beta revision that eliminated the skin opt altogether, and the non-nightstick arrest methods work better now too.

That having been said, allow me to report my findings. First, the arrest functions are incredibly lag sensitive. I can strike a wanted suspect 20 times with a nightstick, but as long as they move around even the slightest bit they can avoid the arrest. Not sure what can be done about that, but it's worth looking into. Second, if a freeroam server uses a resource that adds player blips to players on join, the legalsystem destroys those blips at some point, forcing a restart of the blips resource by admin. Again, not sure if it's legalsystem's fail or playerblips, but an accommodation in this area would be neat.

Aside from bugs, I have a few ideas for added functions. For instance, a commandHandler that allows players to post bail calculated by wanted star level, with a customized value per star in the meta. And I'd like to see a long timer added to the wanted levels that allows player's levels to decrease if they lay low; I've received many complaints on my server by players who obtain a wanted level that never goes away if there's no cops on the server to arrest them. And finally, but certainly not critical, can the roles be reversed? For example, kingCIV ups a bat or a flower, and kidnaps the cop?? 8)

The only alteration I did to the resource for use in my server at all was adding another cop station to Missionary Hill to complement the WCG Police HQ I built there, and custom values placed in the meta. If you want to pick my brain further, I'll be watching the thread. Thanks, bro.

-Bravo

  • 4 months later...
  • 2 years later...
  • 5 months later...
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...