Creating freeroam server

I’m trying to build a freeroam server for players to train their aim, how can i restrict players from leaving a specific place? or delete the original map and keep only a specific place where players spawn and train? also how it is possible when player spawn automatically give him all the weapons.

Hey :slight_smile:
Which framework are you using ?
If you are not using any framework just bare FiveM, you can simply make a script that as the two functionnalities you need by doing the following :

  1. The weapon part :
    1.1 You listen for the PlayerJoining event
    1.2 You can predefine the loadout inside a config file
    1.3 When the player is connected you give him the loadout you want by using the Native GiveWeaponToPed()

  2. The training area :
    2.1 In the config file of you resource you define the 4 points of you square/rectangle area
    2.2 In your script you check the position of the player every x seconds
    2.3 If is leaving the area you use a Native like TaskGoStraightToCoord(), to make him walk back into the area