Jump to content

Adding a "pacifist option"


Maxaxle

Recommended Posts

What do I mean by "pacifist option", you ask?

Maybe someone could add an option in the F1 menu when in Sandbox mode to disable being killed but at the same time disable doing damage to other players and their vehicles? It could keep things nice and peaceful where peace is wanted.

EDIT: And I like flowers and rainbows and happy pink bunnies! [/sarcasm]

And, assuming this doesn't make me some sort of hacker, cheater, etc., I would like this to be clientside, so that I may enjoy myself in servers where killing is allowed without having to deal with attackers or flee from them.

I mostly need help on the script itself (no clue which commands to use), and how to phrase the meta.xml, so that it works without (many) problems.

Link to comment

There's problems with people indirectly killing - with vehicles etc. I'm not sure how you'd prevent people from being able to try to run people over. You could prevent then hurting other players, but it'd still be very annoying.

Link to comment

The creation of a meta.xml is very simple, did you read this?

The basic thing, you'll need for your feature, is the following:

https://wiki.multitheftauto.com/wiki/OnC ... ayerDamage

If a player is "damaged" (hurt), this event is triggered.

If you cancel it, the respective player won't lose health.

To use this to your advantage, you do two things at this point:

Check, if the player, on which the injury is inflicted, is in "sandbox mode".

The second thing is to check, if the attacker is in this mode.

Both will have a cancelEvent outcome, so that players in sandbox mode are invincible, and so are people, which are attacked by such players.

This is only the core of the whole thing, but the rest should be easily figured out.

Oh yeah, and also read this: https://wiki.multitheftauto.com/wiki/CancelEvent

Edited by Guest
Link to comment
The creation of a meta.xml is very simple, did you read this?

The basic thing, you'll need for your feature is the following:

https://wiki.multitheftauto.com/wiki/OnC ... ayerDamage

If a player is "damaged" (hurt), this event is triggered.

If you cancel it, the respective player won't lose health.

To use this to your advantage, you do two things at this point:

Check, if the player, on which the injury is inflicted, is in "sandbox mode".

The second thing is to check, if the attacker is in this mode.

Both will have a cancelEvent outcome, so that players in sandbox mode are invincible, and so are people, which are attacked by such players.

This is only the core of the whole thing, but the rest should be easily figured out.

Oh yeah, and also read this: https://wiki.multitheftauto.com/wiki/CancelEvent

I'd be lying if I said this post wasn't useful.

Link to comment

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...