[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
#2

Narly array lol, but nice.
Reply
#3

Bump

Was on third page and no one got to see it
Reply
#4

Nice Useful for... Ehm.. Something
Reply
#5

Nice job bro.
Reply
#6

re-download please(
Reply
#7

Download link not working!! please re-upload the new one
Reply
#8

Nice yob!.

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

Please Reupload
Reply
#10

Please. Reupload this NICE thing!! Please.
Reply
#11

New link:

http://www.strickenkid.com/php_zones/download.php
Reply
#12

Watta nice Application
Reply
#13

hey....i am getiing an error in my samp script when i use Get3dZone
is there any include ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)