[Tool/Web/Other] [PHP] SA:MP Zones (Locations)
#1

SA:MP Zones PHP
About
You all may know the SA:MP zones pawno include. Well I have transformed it into a PHP version, you can now use this PHP class for your online maps, and anything else you find it useful for. This PHP class comes with two functions; one for 2D and one for 3D.


Functions
  • Get2DZone($x, $y);
  • Get3DZone($x, $y, $z);
Both functions return the name of the zone found. If no zone is found for the co-ordinates, it will return "San Andreas".

Use

To use this class, simply include the file into the php file you wish and declare a new SAMPZones class instance.

Код:
include( "zones.php" );
$zones = new SAMPZones();
Then use the functions as so:

Код:
$2d_zone_name = $zones->Get2DZone($x_var, $y_var);
$3d_zone_name = $zones->Get3DZone($x_var, $y_var, $z_var);
Testing

You can test the class here.

Download

http://www.strickenkid.com/php_zones/download.php

Thanks To
  • Blacklite - big help!
  • Woet - [22:10] <@Woet> why am I not in the credits, StrickenKid
  • Whoever created the original SA:MP zones include
Reply


Messages In This Thread
[PHP] SA:MP Zones (Locations) - by StrickenKid - 03.04.2010, 04:44
Re: [PHP] SA:MP Zones (Locations) - by Kyosaur - 03.04.2010, 08:30
Re: [PHP] SA:MP Zones (Locations) - by StrickenKid - 07.04.2010, 22:51
Re: [PHP] SA:MP Zones (Locations) - by Fj0rtizFredde - 08.04.2010, 07:16
Re: [PHP] SA:MP Zones (Locations) - by [MWR]Blood - 08.04.2010, 08:28
Re: [PHP] SA:MP Zones (Locations) - by Johnny_Xayc - 08.11.2010, 10:13
Re: [PHP] SA:MP Zones (Locations) - by royal_king - 08.11.2010, 10:50
Respuesta: [PHP] SA:MP Zones (Locations) - by xenowort - 08.11.2010, 11:20
AW: [PHP] SA:MP Zones (Locations) - by GooMan - 08.11.2010, 13:37
Re: [PHP] SA:MP Zones (Locations) - by GooMan - 27.11.2010, 14:57
Re: [PHP] SA:MP Zones (Locations) - by Blacklite - 09.06.2011, 00:04
Re: [PHP] SA:MP Zones (Locations) - by BASITJALIL - 10.06.2011, 08:20
Re : [PHP] SA:MP Zones (Locations) - by trickter - 02.12.2011, 09:13

Forum Jump:


Users browsing this thread: 1 Guest(s)