SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 22/04/2011, 01:29 PM   #1
captainjohn
Huge Clucker
 
captainjohn's Avatar
 
Join Date: Jul 2010
Location: United Kingdom
Posts: 409
Reputation: 29
Default How to create Gang Zones

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 Code:
// 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 Code:
// 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 Code:
public OnGameModeInit()
{
and I have highlighted in green what you must add to:
pawn Code:
public OnPlayerSpawn(playerid)
{
Here it is:


So now my code for OnGameModeInit should look like this (maybe different in your case).
pawn Code:
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 Code:
public OnPlayerSpawn(playerid)
{
    GangZoneShowForPlayer(playerid, GROVE, 0x00FF0096);
.

Now last but not least.
Go to,
pawn Code:
public OnGameModeExit()
{
and add this under it, change GROVE to what ever you have named your Variable Name.
pawn Code:
GangZoneDestroy(GROVE);

So the final code for OnGameModeExit will look like this.
pawn Code:
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.
captainjohn is offline   Reply With Quote
Old 22/04/2011, 02:11 PM   #2
[ADC]Aldi96
Big Clucker
 
[ADC]Aldi96's Avatar
 
Join Date: Apr 2011
Location: GREECE
Posts: 72
Reputation: 0
Default Re: How to create Gang Zones

Ok i test this i like gangzones i use in my server in latest update.
Thank You Al1
__________________
Register in ADC-Forum : Click Me
Contact with me in email : aldi@hotmail.gr


You need to Host your Site & Forum for free go there :
Click me to host your Website&forum&Blog Free Or Premium


[ADC]Aldi96 is offline   Reply With Quote
Old 22/04/2011, 02:24 PM   #3
captainjohn
Huge Clucker
 
captainjohn's Avatar
 
Join Date: Jul 2010
Location: United Kingdom
Posts: 409
Reputation: 29
Default Re: How to create Gang Zones

No problem.
captainjohn is offline   Reply With Quote
Old 22/04/2011, 02:26 PM   #4
NotoriousMOB
Huge Clucker
 
NotoriousMOB's Avatar
 
Join Date: Sep 2010
Location: Denmark
Posts: 439
Reputation: 3
Default Re: How to create Gang Zones

Very easy to found out, never heard of X-Treme San Andreas Multiplayer Ultime Mapper
but there's easyer ways tho but great. ^^
__________________
Check out Mafia 2 Multiplayer

NotoriousMOB is offline   Reply With Quote
Old 23/04/2011, 01:41 AM   #5
Haydz
Gangsta
 
Haydz's Avatar
 
Join Date: Jul 2010
Location: New Zealand
Posts: 752
Reputation: 44
Default Re: How to create Gang Zones

Nice tutorial. going to have to give that program ago.
__________________

Don't view these forums much anymore, still check every once and awhile so if you send me a PM It'll take a bit for me to respond!
Haydz is offline   Reply With Quote
Old 29/04/2011, 03:51 PM   #6
captainjohn
Huge Clucker
 
captainjohn's Avatar
 
Join Date: Jul 2010
Location: United Kingdom
Posts: 409
Reputation: 29
Default Re: How to create Gang Zones

Quote:
Originally Posted by NotoriousMOB View Post
Very easy to found out, never heard of X-Treme San Andreas Multiplayer Ultime Mapper
but there's easyer ways tho but great. ^^
I thought X-Treme San Andreas Multiplayer Ultime Mapper was as easy as it gets.
captainjohn is offline   Reply With Quote
Old 29/04/2011, 04:02 PM   #7
G*Mafia
Big Clucker
 
Join Date: Aug 2010
Posts: 69
Reputation: 0
Default Re: How to create Gang Zones

Thank you, Quite Helpful.
G*Mafia is offline   Reply With Quote
Old 30/04/2011, 10:32 PM   #8
captainjohn
Huge Clucker
 
captainjohn's Avatar
 
Join Date: Jul 2010
Location: United Kingdom
Posts: 409
Reputation: 29
Default Re: How to create Gang Zones

Quote:
Originally Posted by G*Mafia View Post
Thank you, Quite Helpful.
No problem.
captainjohn is offline   Reply With Quote
Old 02/05/2011, 06:44 PM   #9
Vero
Big Clucker
 
Vero's Avatar
 
Join Date: Jan 2011
Location: Scotland
Posts: 110
Reputation: 10
Default Re: How to create Gang Zones

Your a saint Thanks just what i was looking for.
Vero is offline   Reply With Quote
Old 02/05/2011, 06:49 PM   #10
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,001
Reputation: 133
Default Re: How to create Gang Zones

WOW
Just wondering if I will find this one somewhere.
__________________
(RETIRED)
=WoR=Varth 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] IntroZones - The Easiest way to create gang zones. Version 1.0 introzen Filterscripts 68 18/07/2015 02:07 AM
How to create zones to map? Jakku Help Archive 2 09/07/2009 06:15 PM
A little problem with gang zones (only create gang zones) CTCCoco Help Archive 4 20/02/2009 10:59 AM


All times are GMT. The time now is 04:25 AM.


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