[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
#2

Ok i test this i like gangzones i use in my server in latest update.
Thank You Al1
Reply
#3

No problem.
Reply
#4

Very easy to found out, never heard of X-Treme San Andreas Multiplayer Ultime Mapper
but there's easyer ways tho but great. ^^
Reply
#5

Nice tutorial. going to have to give that program ago.
Reply
#6

Quote:
Originally Posted by NotoriousMOB
Посмотреть сообщение
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.
Reply
#7

Thank you, Quite Helpful.
Reply
#8

Quote:
Originally Posted by G*Mafia
Посмотреть сообщение
Thank you, Quite Helpful.
No problem.
Reply
#9

Your a saint Thanks just what i was looking for.
Reply
#10

WOW
Just wondering if I will find this one somewhere.
Reply
#11

Give link of download that program!?
Reply
#12

the wiki was this tutorial.

https://sampwiki.blast.hk/wiki/GangZoneCreate

and
create gangzone is easy, more amazing make it functionate.

not bad tuto.
Reply
#13

good but i want to know how to create gang zones for capture??
Reply
#14

Good,i like it
I always used the classic mode but this is better :P
Reply
#15

cool man


only 26 errors!!!!!!!!!!




C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(1975) : error 010: invalid function or declaration
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(3864) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(3893) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4239) : error 004: function "SafeSetPlayerInterior" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4282) : error 017: undefined symbol "GetVehicleName"
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4282) : warning 202: number of arguments does not match definition
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(429 : error 004: function "IsASalesVehicle" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4302) : error 004: function "GetVehiclePrice" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4397) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4402) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4407) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4412) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(4417) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(5235) : error 004: function "ABroadCast" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(5237) : error 004: function "ABroadCast" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(524 : error 004: function "LoginLog" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(5454) : error 004: function "KickLog" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6036) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6054) : error 004: function "SendAdminMessage" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6057) : error 004: function "KickLog" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6059) : error 004: function "OnPlayerUpdateEx" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6081) : error 004: function "SendAdminMessage" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6084) : error 004: function "KickLog" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6092) : error 004: function "OnPlayerUpdateEx" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6103) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6111) : error 004: function "SendAdminMessage" is not implemented
C:\Documents and Settings\msitvifm\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6113) : error 004: function "SendAdminMessage" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#16

i create the the zone in the program correct, put everything in right place
BUT
getting 4 warnings, and on this line
pawn Code:
ZoneThunderbirds = GangZoneCreate(-2942,825, -992,6194, -1086,042, 1588,191);
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
But thats not all, when i enter the game and look on the map, the zone is way wrong placed!
Reply
#17

What a nice tut!?
Reply
#18

Its great, awesome works perfect, great job!
Reply
#19

Quote:
Originally Posted by cruising
View Post
i create the the zone in the program correct, put everything in right place
BUT
getting 4 warnings, and on this line
pawn Code:
ZoneThunderbirds = GangZoneCreate(-2942,825, -992,6194, -1086,042, 1588,191);
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
But thats not all, when i enter the game and look on the map, the zone is way wrong placed!
Change:
pawn Code:
ZoneThunderbirds = GangZoneCreate(-2942,825, -992,6194, -1086,042, 1588,191);
to:
pawn Code:
ZoneThunderbirds = GangZoneCreate(-2942.825, -992.6194, -1086.042, 1588.191);
Notice the dots(.) instead of the commas(,).
Reply
#20

Quote:
Originally Posted by Prumpuz
View Post
Change:
pawn Code:
ZoneThunderbirds = GangZoneCreate(-2942,825, -992,6194, -1086,042, 1588,191);
to:
pawn Code:
ZoneThunderbirds = GangZoneCreate(-2942.825, -992.6194, -1086.042, 1588.191);
Notice the dots(.) instead of the commas(,).
Yeah i noticed that after i made the reply, cant understand why its made like that with commas
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)