[Include] zGangZones v0.1.0 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] zGangZones v0.1.0 (
/showthread.php?tid=486091)
zGangZones [0.1.1] [07-01-2014] -
Zume - 07.01.2014
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
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;
}
![](http://imageshack.us/a/img594/7011/of64.jpg)
DOWNLOADS
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);
Re: zGangZones v0.1.0 -
CrewMaster - 07.01.2014
Nice .. good work
Re: zGangZones v0.1.0 -
twerko13 - 07.01.2014
Second! Great include btw...
Respuesta: Re: zGangZones v0.1.0 -
Zume - 07.01.2014
Quote:
Originally Posted by CrewMaster
Nice .. good work
|
Quote:
Originally Posted by twerko13
Second! Great include btw...
|
Thanks
PD: Updated.
Re: zGangZones v0.1.0 -
Diogo123 - 10.01.2014
Nice
Re: zGangZones v0.1.0 -
Sojo12 - 11.01.2014
Nice include.