Jump to content

How can I restrict players to only be in a certain spot?


KalanYamato

Recommended Posts

Hi, I'm KalanYamato... I'm new to the map editor and MTA. =)

I created a CTF map, which limits are the Pier 69, SFPD and the road connecting both places. I've created barriers on the roads/paths that would go to somewhere unrelated, but I have some few problems:

Players can jump the barriers

Helicopters are useable

The sea is not blocked (I can't be bothered to block it still D: )

So I'm wondering, is it possible to push a player back to the battlefield/playzone if they go off the boundries? If so, how can I do that?

Sorry for this nooby question, but I just began using the map editor for ACTUAL map creating xD

OFF-TOPIC: And yes, I setted everything else for a CTF map: flag, teams, spawnpoint, weapon spawn... don't bother me about these xD

Link to comment

The choice is pretty much yours. Personally, I would use colshapes (rectangle, circle, polygon, whichever suits you, and more importantly, the map...) and setElementVelocity on the players when they leave it (event). Remember that setElementVelocity is a little bugged when using it on peds/players. To successfully set a player velocity, set their position first, a small increase in Z position, then set their velocity immediately after, using setTimer.

There is already a (crappy) maplimits resource yet, but all that does is flash a warning and then KILL people... :roll:

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