PDA

View Full Version : [Tool/Web/Other] [PHP] SA:MP Zones (Locations)


StrickenKid
03/04/2010, 04:44 AM
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 (http://www.strickenkid.com/php_zones/test.php).

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

Kyosaur
03/04/2010, 08:30 AM
Narly array lol, but nice.

StrickenKid
07/04/2010, 10:51 PM
Bump

Was on third page and no one got to see it :o

Fj0rtizFredde
08/04/2010, 07:16 AM
Nice :) Useful for... Ehm.. Something :D

[MWR]Blood
08/04/2010, 08:28 AM
Nice job bro.

Johnny_Xayc
08/11/2010, 11:13 AM
re-download please(

royal_king
08/11/2010, 11:50 AM
Download link not working!! please re-upload the new one

xenowort
08/11/2010, 12:20 PM
Nice yob!.

But the download link have a problem with the function Fopen for create file and download. Fix this.

GooMan
08/11/2010, 02:37 PM
Please Reupload :)

GooMan
27/11/2010, 03:57 PM
Please. Reupload this NICE thing!! Please.

Blacklite
09/06/2011, 12:04 AM
New link:

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

BASITJALIL
10/06/2011, 08:20 AM
Watta nice Application

trickter
02/12/2011, 10:13 AM
hey....i am getiing an error in my samp script when i use Get3dZone
is there any include ??