27.01.2013, 17:11
(
Last edited by Swimor; 30/01/2013 at 01:12 PM.
)
RL_AREAS - Create your own areas in one line!
version: 0.2.4
Hello,
First of all sorry for my bad English, if i had any mistake please correct me.
I made little include that gives you option to create area in just one line!
It's very simple, working on just one timer (if you doesn't have any area created the timer not working) and check for most close area.
Functions
Check if the given area is valid and in use.
Return: Bool (true / false)
Create circle area in radius that defined by you.
Return: Int (area ID)
Destroy created area, must be valid!
Return: Bool (success / fail)
Check if player in specific area
Return: Bool (true / false)
Check if player in any of created areas
Return: Bool (true / false)
Get player area ID
Return: Int (area ID)
CallBacks
Called when player enters area
Called when player exits area
Credits
Download
v0.2.4:
Pastebin - http://pastebin.com/cKyP0x1C
Bugs & Suggestions
Whats new?
Enjoy!
version: 0.2.4
Hello,
First of all sorry for my bad English, if i had any mistake please correct me.
I made little include that gives you option to create area in just one line!
It's very simple, working on just one timer (if you doesn't have any area created the timer not working) and check for most close area.
Functions
Code:
// IsValidAreaID(areaid) if(IsValidAreaID(1)) return SendClientMessage(0, -1, "Area number 1 is valid and in use!");
Return: Bool (true / false)
Code:
// CreateArea(X, Y, Z, Radius = DEFAULT_RADIUS, Interior = -1, VirtualWorld = -1) new myArea = CreateArea(0.0, 0.0, 0.0, 20.0, -1, -1);
Return: Int (area ID)
Code:
// DestroyArea(areaid) new myArea = CreateArea(0.0, 0.0, 0.0, 20.0, -1, -1); DestroyArea(myArea);
Return: Bool (success / fail)
Code:
// IsPlayerInArea(playerid, areaid) if(IsPlayerInArea(0, 1)) return SendClientMessage(0, -1, "You are in area number 1!");
Return: Bool (true / false)
Code:
// IsPlayerInAnyArea(playerid) if(IsPlayerInAnyArea(0)) return SendClientMessage(0, -1, "You are in one of server areas!");
Return: Bool (true / false)
Code:
// GetPlayerArea(playerid) new areastr[64]; format(areastr, 64, "You are in area number %d!", GetPlayerArea(0)); return SendClientMessage(0, -1, areastr);
Return: Int (area ID)
CallBacks
Code:
public OnPlayerEnterArea(playerid, areaid) { }
Code:
public OnPlayerExitArea(playerid, areaid) { }
Credits
Quote:
* Thanks to: * RaFaeL - Scripting, PAWN * SA:MP Team past, present, future - SA:MP. |
v0.2.4:
Pastebin - http://pastebin.com/cKyP0x1C
Bugs & Suggestions
Quote:
Known bugs: * None |
Quote:
Suggestions: * ADD CUBE area type * ADD TRAINGLE area type * ADD PerPLayer area creating * Allow to non meter Z param |
Quote:
None. |