[Tutorial] [New] How to make capture zone system (no more code repeating)
#17

Quote:
Originally Posted by aloveliday
View Post
Gammix your script looks like awesome but i am very newbie about pawno so i did not understand what you explained about.

Could you complete the blanks with true numbers and names to be more specific?
I mean i need more detail i did not make it.

I just need an example script with fake number and coordinate zone names and other names.Please
Explanation is given in FAQ. But here i'll try a bit harder.


This array hods team's information. The first param is the team's name and the second is its color.
Syntax:
pawn Code:
{"team_name", team_color}
Example:
pawn Code:
new const gTeamData[][e_TEAM_DATA] =
{
    {"Germany", 0xFFFF90FF}
};
The thing to keep in mind is you use the same index (here "Germany" is at 0) as teamid, so germany should be:
pawn Code:
SetPlayerTeam(playerid, 0);

Secondly, the capture zone array:
You can add as many you want, just take care of the syntax only.
Syntax:
pawn Code:
{"zone_name", {minx, miny, maxx, maxy}, {cpx, cpy, cpz}, zone_owner_team}
Keep in mind that zone_owner_team must be an existing index from gTeamData. Like germany is 0 so if you put 0 as zone_owner_team, then basically you are setting germany as the default owner of the zone.

Example:
pawn Code:
new const gCaptureZone[][e_CAPTURE_ZONE] =
{
    {"Big Ear", {-437.5,1513.671875, -244.140625,1636.71875}, {-311.0136,1542.9733,75.5625}, 0}
};
So we can create our sample (2 teams and 1 capture zone):
pawn Code:
new const gTeamData[][e_TEAM_DATA] =
{
    {"Germany", 0xFFFF90FF},
    {"India", 0xFF90FFFF},
};

new const gCaptureZone[][e_CAPTURE_ZONE] =
{
    {"Big Ear", {-437.5,1513.671875, -244.140625,1636.71875}, {-311.0136,1542.9733,75.5625}, 0}
};
You can also check the Sample(pastebin link) from main page.
Reply


Messages In This Thread
[New] How to make capture zone system (no more code repeating) - by Gammix - 23.08.2015, 09:25
Re: [New] How to make capture zone system (no more code repeating) - by Hemeei - 23.08.2015, 09:29
Re: [New] How to make capture zone system (no more code repeating) - by Karan007 - 23.08.2015, 09:34
Re: [New] How to make capture zone system (no more code repeating) - by jamesmith12 - 23.08.2015, 12:27
Re: [New] How to make capture zone system (no more code repeating) - by Hemeei - 23.08.2015, 12:32
Re: [New] How to make capture zone system (no more code repeating) - by Viki - 23.08.2015, 18:27
Re: [New] How to make capture zone system (no more code repeating) - by Cassy_ - 25.08.2015, 10:38
Re: [New] How to make capture zone system (no more code repeating) - by SEIFOUNE123 - 25.08.2015, 11:02
Re: [New] How to make capture zone system (no more code repeating) - by jamesmith12 - 25.08.2015, 14:15
Re: [New] How to make capture zone system (no more code repeating) - by HydraHumza - 25.08.2015, 17:05
Re: [New] How to make capture zone system (no more code repeating) - by N0FeaR - 13.12.2015, 21:31
Re: [New] How to make capture zone system (no more code repeating) - by Counterafk - 03.01.2016, 23:27
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 04.01.2016, 03:54
Re: [New] How to make capture zone system (no more code repeating) - by CrunchxNoy - 04.01.2016, 06:34
Re: [New] How to make capture zone system (no more code repeating) - by Counterafk - 04.01.2016, 14:43
Re: [New] How to make capture zone system (no more code repeating) - by aloveliday - 04.01.2016, 15:42
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 05.01.2016, 09:04
Re: [New] How to make capture zone system (no more code repeating) - by stormchaser206 - 16.03.2016, 02:35
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 16.03.2016, 02:47
Re: [New] How to make capture zone system (no more code repeating) - by stormchaser206 - 16.03.2016, 21:51
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 17.03.2016, 00:25
Re: [New] How to make capture zone system (no more code repeating) - by stormchaser206 - 17.03.2016, 02:33
Re: [New] How to make capture zone system (no more code repeating) - by Yultranions - 29.09.2016, 10:46
Re: [New] How to make capture zone system (no more code repeating) - by FreAkeD - 29.09.2016, 12:12
Re: [New] How to make capture zone system (no more code repeating) - by Hunud - 10.06.2017, 13:36
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 10.06.2017, 14:58
Re: [New] How to make capture zone system (no more code repeating) - by Hunud - 10.06.2017, 15:08
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 12.09.2017, 18:38
Re: [New] How to make capture zone system (no more code repeating) - by Psycho96 - 08.12.2017, 20:58
Re: [New] How to make capture zone system (no more code repeating) - by Gammix - 08.12.2017, 23:13

Forum Jump:


Users browsing this thread: 1 Guest(s)