Hi ! Another French Baguette here !
iZone description :
This tool allow you to create a hull concave shape by creating each point. Then, this is save to Db with the zone name.
On Client-Side, just by Triggering an event, you can know if the player is in this shape.
So... ok but what this add to my server ? This allow you to create personalized shape for field zones for example.
iZone usage :
You need permission_level >= 3, or, change the value
In the chat : /izone start
Then press [L] to add points (no limits)
In the chat /izone stop (this will shows a popup to put a name on this zone)
Extract .rar in resources, put “-iZone” into ctmp file.
Import the .sql in a new table named "zone"
Don’t forget to change Db infos.
From Client :
TriggerEvent("izone:isPlayerInZone", "zoneName" ,function(cb) -- cb = false or true end) TriggerEvent("izone:isPointInZone", x, y,"zoneName" ,function(cb) -- cb = false or true end) TriggerEvent("izone:tpToPointZone", "zoneName", 2) -- 2 or whatever (the point Index) TriggerEvent("izone:tpToZone", "zoneName") -- Tp to the first point TriggerEvent("izone:isPlayerInAnyZone" ,function(cb) -- cb contain an Array of zone the Player is in else nil end) TriggerEvent("izone:isPointInAnyZone", x, y ,function(cb) end)
- Added gravityCenter and longestDistance to the db
- Stability Improvment : Now if the distance between point and zone is greater than longestDistance, the wind number will not be calculated anymore
- Now support Restat
- Now Ceil the numbers with 2 number after the coma … ouf !
thanks to Maths research and thanks to EssentialMode made by Kanerps.
If you got issue, improvment idea, I take it wih enjoy