Jump to page content
English English   Polish Polish   Dutch Dutch   Russian Russian   German German   Hungarian Hungarian   Norwegian Norwegian   Swedish Swedish   Finnish Finnish   Romanian Romanian   Spanish Spanish   Portuguese Portuguese   Latvian Latvian  
Homepage
Home
Register
Login

Resources
Forum
Wiki
Servers

rsscustomdistricts

Category:misc
Author(s):Dzsozi
Downloads:591
Rate:You need to be logged in to vote
Rating:5 (1 Vote)
Description:
With this script you are able to create your custom districts in MTA:SA, this is useful for almost "anything" (custom maps with your own districts, gang zones (which might require a little editing), protect zones, etc.)!
You can create your own districts in the districtC.lua file, an example is given.

Export functions:
- getDistrictName(element)
Get the custom district name of an element (works client and server side)
- onElementDistrictChange
This is a custom event, the source of this event is the element that changed district (currently working only client-side)
PARAMETERS: districtName - An integer representing the name of the current custom district

Note that the event works on client-side, but it is possible to do it on server-side if it's needed.

!! The source of the onElementDistrictChange event is the element that changed the district, could be a vehicle, a ped, a player, anything that is an element. !!

An example script for using the event and getting the district name is given in the exampleC.lua file, check that for usage and the example command.

Future versions MIGHT contain:
- Server-sided onElementDistrictChange event
- A command to add a district manually

Special thanks to for helping with the script : Tails, pa3ck
If you have any questions just write a comment! Feel free to edit, but please, keep the credits.
...

(more)

Download latest version | Report

Version history

Version Publish Date Changes
1.0.0 2016-11-17 19:31:40 First public release Download