07.01.2014, 04:10
(
Last edited by Zume; 07/01/2014 at 03:01 PM.
)
INTRODUCTION
This include makes it possible to create GangZones and detect that area is easily, basciamente are only functions in future there will be more versions features on this include in this release are only features for easy way to detect if you are in that area easily
FUNCTIONS
* PlayerOnGangZone
Detects if the playerid in the specified area.
* CreateGangZone
Create GangZone, this function is to get the minx, miny, maxX, maxY, color and use them PlayerOnGangZone or other functions.
* DestroyGangZone
Destroy GangZone almost same as above, only this destroys and Sets a new slot to use.
* ShowGangZoneToPlayer
Displays GangZone to playerid, what sets this function of GangZoneShowForPlayer is not now necessary to set the color used, as it now stands is CreateGangZone color.
* ShowGangZoneForAll
Displays GangZone all players, what sets this function of GangZoneShowForAll is not now necessary to set the color used, as it now stands is CreateGangZone color.
* SetGangZoneColorForAll
Change the color of GangZone for all players.
EXAMPLE
DOWNLOADS
PASTEBIN v.0.1.1
CHANGELOG
This include makes it possible to create GangZones and detect that area is easily, basciamente are only functions in future there will be more versions features on this include in this release are only features for easy way to detect if you are in that area easily
FUNCTIONS
* PlayerOnGangZone
Detects if the playerid in the specified area.
* CreateGangZone
Create GangZone, this function is to get the minx, miny, maxX, maxY, color and use them PlayerOnGangZone or other functions.
* DestroyGangZone
Destroy GangZone almost same as above, only this destroys and Sets a new slot to use.
* ShowGangZoneToPlayer
Displays GangZone to playerid, what sets this function of GangZoneShowForPlayer is not now necessary to set the color used, as it now stands is CreateGangZone color.
* ShowGangZoneForAll
Displays GangZone all players, what sets this function of GangZoneShowForAll is not now necessary to set the color used, as it now stands is CreateGangZone color.
* SetGangZoneColorForAll
Change the color of GangZone for all players.
EXAMPLE
pawn Code:
#include <a_samp>
#include <zGangZones>
new zGangZone:GroveStreet;
new zGangZone:PandillaBallas;
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(271, 2507.65, -1678.41, 13.55, 269.1425, 0, 0, 0, 0, 0, 0);
GroveStreet = z_GangZoneCreate(2337.9004,-1808.8383,2590.2043,-1610.3673, 0x00FF0088);
PandillaBallas = z_GangZoneCreate(2084.7,-1808.8383,2337.9004,-1610.3673, 0xFF00FF88);
return 1;
}
public OnPlayerUpdate(playerid)
{
if(PlayerOnGangZone(playerid, GroveStreet))
{
GameTextForPlayer(playerid, "~G~ESTAS EN TERRITORIO GROVE STREET.", 2000, 3);
}
if(PlayerOnGangZone(playerid, PandillaBallas))
{
GameTextForPlayer(playerid, "~P~ESTAS EN TERRITORIO BALLAS.", 2000, 3);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
ShowGangZoneToPlayer(playerid, GroveStreet);
ShowGangZoneToPlayer(playerid, PandillaBallas);
return 1;
}
public OnGameModeExit()
{
DestroyGangZone(GroveStreet);
DestroyGangZone(PandillaBallas);
return 1;
}
PASTEBIN v.0.1.1
CHANGELOG
- v0.1.0
- PlayerOnGangZone(playerid, zGangZone:ID);
- CreateGangZone(Float:minx, Float:miny, Float:maxx, Float:maxy, color);
- DestroyGangZone(gIDe);
- v0.1.1
- ShowGangZoneToPlayer(playerid, zGangZone:ID);
- SetGangZoneColorForAll(zGangZone:ID, color);
- ShowGangZoneForAll(zGangZone:ID);