[Tutorial] How to create Gang Zones
#1

This is easy once you have done it once before.
I am not the best tutorial write but here you go.

So I will teach the noobs out there how to create gang zones.
If you are confused as what I mean by gang zones, then look here.

(internet picture)

Ok lets start.

At the top of your script we need to add the variables.
In my Tutorial I will use 4 different gangs, so we need to define 4 different gangs.

This goes at the top were your variables go.
pawn Код:
// Gang Zones
new GROVE, BALLAS, RUSSIANMAFIA, VAGOS;
Now we need to create the gang zones, I find it best using a little program called X-Treme San Andreas Multiplayer Ultime Mapper. Or you can follow these instructions here (I won't go into detail with them).

In X-Treme San Andreas Multiplayer Ultime Mapper at the top you will see a list of tabs.

In this Tutorial I will choose Los Santos.

To create the gang zone, just simply, put your mouse on the map, go to were you want to add the gang zone. Click and drag to create a square/rectangle.
Then once done this should pop up.

Click on Gang Zones & World Boundaries.


Now once you have clicked on Gang Zones & World Boundaries, click on color to change the color of what the gang zone will look like once added to your script. Once chosen click ok to exit the colors.


Now we need to enter a Variable Name.
Remember this that we added earlier?
pawn Код:
// Gang Zones
new GROVE, BALLAS, RUSSIANMAFIA, VAGOS;
Choose one of your Variable Names that you would like. In this tutorial I will choose Grove.
Click ok once chosen.

Now I have highlighted in red what you must add to:
pawn Код:
public OnGameModeInit()
{
and I have highlighted in green what you must add to:
pawn Код:
public OnPlayerSpawn(playerid)
{
Here it is:


So now my code for OnGameModeInit should look like this (maybe different in your case).
pawn Код:
public OnGameModeInit()
{
    GROVE = GangZoneCreate(2326.489, -1733.182, 2600.293, -1614.75);
Now my code for OnPlayerSpawn should look like this (Maybe different in your case).
pawn Код:
public OnPlayerSpawn(playerid)
{
    GangZoneShowForPlayer(playerid, GROVE, 0x00FF0096);
.

Now last but not least.
Go to,
pawn Код:
public OnGameModeExit()
{
and add this under it, change GROVE to what ever you have named your Variable Name.
pawn Код:
GangZoneDestroy(GROVE);
So the final code for OnGameModeExit will look like this.
pawn Код:
public OnGameModeExit()
{
    GangZoneDestroy(GROVE);
I didn't add any returns into it, as I don't want to confuse you.

If you are wanting to add more than one gang zone, just repeat these steps again.

Hope I helped you.
Thanks.
Reply


Messages In This Thread
How to create Gang Zones - by captainjohn - 22.04.2011, 13:29
Re: How to create Gang Zones - by [ADC]Aldi96 - 22.04.2011, 14:11
Re: How to create Gang Zones - by captainjohn - 22.04.2011, 14:24
Re: How to create Gang Zones - by NotoriousMOB - 22.04.2011, 14:26
Re: How to create Gang Zones - by Haydz - 23.04.2011, 01:41
Re: How to create Gang Zones - by captainjohn - 29.04.2011, 15:51
Re: How to create Gang Zones - by G*Mafia - 29.04.2011, 16:02
Re: How to create Gang Zones - by captainjohn - 30.04.2011, 22:32
Re: How to create Gang Zones - by Vero - 02.05.2011, 18:44
Re: How to create Gang Zones - by =WoR=Varth - 02.05.2011, 18:49
Re: How to create Gang Zones - by SpiderWalk - 03.05.2011, 12:59
Re: How to create Gang Zones - by TheGarfield - 03.05.2011, 14:50
Re: How to create Gang Zones - by SpiderWalk - 07.05.2011, 10:51
Re: How to create Gang Zones - by SkizzoTrick - 09.05.2011, 11:33
Re: How to create Gang Zones - by whyme - 17.05.2011, 17:23
Re: How to create Gang Zones - by cruising - 14.08.2011, 14:54
Re: How to create Gang Zones - by Deviant96 - 14.08.2011, 15:49
Re: How to create Gang Zones - by ModianO - 14.08.2011, 16:02
Re: How to create Gang Zones - by Prumpuz - 14.08.2011, 16:09
Re: How to create Gang Zones - by cruising - 14.08.2011, 19:11

Forum Jump:


Users browsing this thread: 1 Guest(s)