SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 07/01/2014, 04:10 AM   #1
Zume
High-roller
 
Zume's Avatar
 
Join Date: Nov 2011
Location: El Salvador
Posts: 1,642
Reputation: 311
Default zGangZones [0.1.1] [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;
}




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);

Last edited by Zume; 07/01/2014 at 03:01 PM.
Zume is offline   Reply With Quote
Old 07/01/2014, 06:41 AM   #2
CrewMaster
Big Clucker
 
Join Date: Oct 2012
Location: Earth
Posts: 147
Reputation: 12
Default Re: zGangZones v0.1.0

Nice .. good work
__________________
LOOKING FOR A PROFESSIONAL MAPPER
WILL HIRE TOP RANK IN A HOSTED SERVER HAVING HOSTED TAB
CrewMaster is offline   Reply With Quote
Old 07/01/2014, 06:53 AM   #3
twerko13
Little Clucker
 
Join Date: Dec 2013
Posts: 10
Reputation: 2
Default Re: zGangZones v0.1.0

Second! Great include btw...
__________________
My work:
twerko13 is offline   Reply With Quote
Old 07/01/2014, 02:57 PM   #4
Zume
High-roller
 
Zume's Avatar
 
Join Date: Nov 2011
Location: El Salvador
Posts: 1,642
Reputation: 311
Default Respuesta: Re: zGangZones v0.1.0

Quote:
Originally Posted by CrewMaster View Post
Nice .. good work
Quote:
Originally Posted by twerko13 View Post
Second! Great include btw...
Thanks

PD: Updated.
Zume is offline   Reply With Quote
Old 10/01/2014, 12:02 PM   #5
Diogo123
High-roller
 
Diogo123's Avatar
 
Join Date: Aug 2011
Location: No Mundo de SAO ;)
Posts: 1,150
Reputation: 119
Default Re: zGangZones v0.1.0

Nice
__________________

Desenvolvimentos:

New Life RP
Assassins City Freeroam BR [ 42%]

Atualmente criando sistema de eventos
Comming ...
Diogo123 is offline   Reply With Quote
Old 11/01/2014, 09:10 AM   #6
Sojo12
Banned
 
Join Date: Jul 2013
Location: Search and you'll find it...
Posts: 443
Reputation: 43
Default Re: zGangZones v0.1.0

Nice include.
Sojo12 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:01 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.