SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 23/08/2015, 09:25 AM   #1
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,807
Reputation: 831
Default [New] How to make capture zone system (no more code repeating)


Capture Zone Tutorial
Make capturable zone in one line - checkpoint based captures
Last Updated: 12 Sept, 2017

Features:
What makes this different and better from other tutorials/methods used in gamemodes, mostly COD named:
  • Array based data collecting
  • One line one capture zone (Core feature)
  • You can add as many capture zones you want and teams eligible to capture them
  • Progress bar and a textdraw included for cpature info.
  • Short code and efficient
  • Easily portable or you can even use this as a filterscript

Step1: Required Libraries
progress2.inc - http://forum.sa-mp.com/showthread.php?t=629401
streamer.inc (.dll/.so too) - http://forum.sa-mp.com/showthread.php?t=102865

After you install them correctly, if you haven't. Now you have to include them in your script:
PHP Code:
#include <progress2>
#include <streamer> 
Step2: Constants
Now we will declare our constants on the very top so its easier to modify in-game related changes easily.
We are using enumerator, you can use define statement if you want, Doesn't matter.
PHP Code:
#define CAPTURE_TIME 30 // how many seconds to capture a zone 
And now we will add two colors we will be using for client messages:
PHP Code:
#define COLOR_TOMATO \
    
0xFF6347FF
#define COLOR_GREEN \
    
0x00FF00FF 
COLOR_TOMATO - For warning messages
COLOR_GREEN - For success messages

Step3: Function(s)
This is a small one, we just need this function/macro to adjust alpha values of our colors so we don't rely on the colors user specify in our "TEAM" array. We basically require this for making opacity of gangzone color not full (255/FF).

So add this after the colors constants:
PHP Code:
#define ALPHA(%1,%2) \
    
((%& ~0xFF) | clamp(%20x000xFF)) 
Step4: Variables/Arrays
This one needs a little attention.

Team Array:
So first of all, we will make an enumerator-array for our Teams data, we just need the team names and colors so we can use them for information while flashing a gangzone and capture messages.

Since we don't need to change anything in the array, we simply make it constant:
PHP Code:
enum E_TEAM
{
    
bool:E_TEAM_VALID,
    
E_TEAM_NAME[32],
    
E_TEAM_COLOR
};
new const 
TEAM[][E_TEAM] =
{
    {
true"team 1"0xFF0000FF}, // the color's opacity doesn't matter, we will use the function "ALPHA" to change it later
    
{true"team 2"0x00FF00FF}
}; 
Now, as you can see 3 elements are made. Now how this array indexing system i made works is based on the first element:
E_TEAM_VALID: This is basically for those scripts whose teamid are not reliable to array indexes. So lets say you are Team:0 but when your team is set by "SetPlayerTeam", the id there used is 10, so my script will use 10 as an index for the array declared below "TEAM", but the array size is 2, so for that case we use this element, you have to do a bit hardwork here, you have to make 8 more entries in array, all empty but the 10th team with its data included. So it will look like this:

PHP Code:
new const TEAM[][E_TEAM] =
{
    {
true"team 1"0xFF0000FF}, // the color's opacity doesn't matter, we will use the function "ALPHA" to change it later
    
{true"team 2"0x00FF00FF},
    {},
    {},
    {},
    {},
    {},
    {},
    {},
    {
true"team 10"0x0000FFFF// this is the "SetPlayerTeam(playerid, 10)" entry
}; 
Capture Array:
Similar to TEAM array but this time its name is not in Caps, which means its not a constant, yes we need to make changes to this array later on in script.

PHP Code:
enum E_CAPTURE_ZONE
{
    
E_CAPTURE_ZONE_NAME[64],
    
Float:E_CAPTURE_ZONE_GANGZONE_OFFSET[4], // the capture zone's gangzone minx/y and maxx/y
    
Float:E_CAPTURE_ZONE_CP_OFFSET[3], // the x,y,z offset for the checkpoint the players will stay in and capture
    
E_CAPTURE_ZONE_OWNER,
    
E_CAPTURE_ZONE_ATTACKER,
    
E_CAPTURE_ZONE_COUNTDOWN,
    
E_CAPTURE_ZONE_GANGZONE,
    
E_CAPTURE_ZONE_CP,
    
E_CAPTURE_ZONE_AREA,
    
E_CAPTURE_ZONE_TIMER,
    
E_CAPTURE_ZONE_PLAYERS_IN_ZONE
};
new 
captureZone[][E_CAPTURE_ZONE] =
{
    {
"Big Ear", {-437.51513.671875, -244.1406251636.71875}, {-311.01361542.973375.5625}, 0},
    {
"Area 51", {-46.8751697.265625423.8281252115.234375}, {254.45921802.89977.4285}, 1// "1" means the zone owner will be "team 2", notice the number relates to array "TEAM"'s indexes
}; 
As you know by know you can add as many Teams you want, same is here. And you don't need to worry about indexes as well, since we are not using them anywhere importantly, i mean the symmetry doesn't matter.

For example: if i need to add a new zone, i simply do...
PHP Code:
new captureZone[][E_CAPTURE_ZONE] =
{
    {
"Big Ear", {-437.51513.671875, -244.1406251636.71875}, {-311.01361542.973375.5625}, 0},
    {
"Area 51", {-46.8751697.265625423.8281252115.234375}, {254.45921802.89977.4285}, 1}, // "1" means the zone owner will be "team 2", notice the number relates to array "TEAM"'s indexes
    
{"New zone", {0.00.00.00.0}, {0.00.00.0}, 10}, // the new zone
}; 
About the syntax:
PHP Code:
{"zone name", {minxminymaxxmaxy}, {cpxcpycpz}, owner_team_index
Others:
Lastly we need two player variables to store PlayerProgressBar and PlayerTextDraw ids:
PHP Code:
new PlayerText:capturePlayerTextDraw[MAX_PLAYERS];
new 
PlayerBar:capturePlayerBar[MAX_PLAYERS]; 
Step5: Initializing
If you are using filterscript use: OnFilterScriptInit
PHP Code:
public OnGameModeInit()
{
    for (new 
isizeof captureZonei++)
    {
        
captureZone[i][E_CAPTURE_ZONE_ATTACKER] = INVALID_PLAYER_ID// set the zone attacker to none
        
captureZone[i][E_CAPTURE_ZONE_COUNTDOWN] = 0;
        
captureZone[i][E_CAPTURE_ZONE_GANGZONE] = GangZoneCreate(captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][0], captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][1], captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][2], captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][3]);
        
captureZone[i][E_CAPTURE_ZONE_CP] = CreateDynamicCP(captureZone[i][E_CAPTURE_ZONE_CP_OFFSET][0], captureZone[i][E_CAPTURE_ZONE_CP_OFFSET][1], captureZone[i][E_CAPTURE_ZONE_CP_OFFSET][2], 1.0);
        
captureZone[i][E_CAPTURE_ZONE_AREA] = CreateDynamicRectangle(captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][0], captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][1], captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][2], captureZone[i][E_CAPTURE_ZONE_GANGZONE_OFFSET][3]);
    }

    return 
1;

Its pretty self explanatory!

Now initializing when a player connect, i.e. creating textdraw and progress bar:
PHP Code:
public OnPlayerConnect(playerid)
{
    
capturePlayerBar[playerid] = CreatePlayerProgressBar(playerid44.000000318.00000089.5000003.700000, -1429936641CAPTURE_TIME0);

    
capturePlayerTextDraw[playerid] = CreatePlayerTextDraw(playerid87.000000308.000000"Capturing !...");
    
PlayerTextDrawBackgroundColor(playeridcapturePlayerTextDraw[playerid], 255);
    
PlayerTextDrawFont(playeridcapturePlayerTextDraw[playerid], 1);
    
PlayerTextDrawLetterSize(playeridcapturePlayerTextDraw[playerid], 0.2900001.099999);
    
PlayerTextDrawColor(playeridcapturePlayerTextDraw[playerid], -1);
    
PlayerTextDrawAlignment(playeridcapturePlayerTextDraw[playerid], 2);
    
PlayerTextDrawSetOutline(playeridcapturePlayerTextDraw[playerid], 1);
    return 
1;

Step6: Showing ganzones
So here we loop through the array "captureZone" and show gangzone to player.

In the second part we see if the gangzone is under attack, if it is then flash it for player with the attacker's team color.
PHP Code:
public OnPlayerSpawn(playerid)
{
    for (new 
isizeof captureZonei++)
    {
        
// show gangzones
        
GangZoneShowForPlayer(playeridcaptureZone[i][E_CAPTURE_ZONE_GANGZONE], ALPHA(TEAM[captureZone[i][E_CAPTURE_ZONE_OWNER]][E_TEAM_COLOR], 100));

        
// flash gangzone if under attack
        
if (captureZone[i][E_CAPTURE_ZONE_ATTACKER] != INVALID_PLAYER_ID)
        {
            
GangZoneFlashForPlayer(playeridcaptureZone[i][E_CAPTURE_ZONE_GANGZONE], ALPHA(TEAM[GetPlayerTeam(captureZone[i][E_CAPTURE_ZONE_ATTACKER])][E_TEAM_COLOR], 100));
        }
    }
    return 
1;

Step7: Showing gangzone name (Optional)
This callback is called when you enter a dynamic area created through streamer plugin. So if you noticed in Initializing step, we made a DynamicRectangle exactly to the coordinates of our capture zones. So each gangzone have its own dynamic area too. So now we can use it to detect if a player enters that zone and we simply show him the zone name as a GameText!

PHP Code:
public OnPlayerEnterDynamicArea(playeridareaid)
{
    for (new 
isizeof captureZonei++)
    {
        if (
areaid == captureZone[i][E_CAPTURE_ZONE_AREA]) // matches the player area to the gangzone area
        
{
            new 
string[64 3];
            
format(stringsizeof string"~w~%s"captureZone[i][E_CAPTURE_ZONE_NAME]);
            
GameTextForPlayer(playeridstring50006);
            return 
1;
        }
    }
    return 
1;

Step8: Capturing A Zone
Similar to dynamic areas, when a player enteres a dynamic checkpoint, this callback is called. And so it goes:
PHP Code:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    for (new 
isizeof captureZonei++)
    {
        if (
checkpointid == captureZone[i][E_CAPTURE_ZONE_CP]) // player entered checkpoint of the gangzone
        
{
            if (
IsPlayerInAnyVehicle(playerid)) // this little check disallows the player to capture in a vehicle
            
{
                
SendClientMessage(playeridCOLOR_TOMATO"You cannot capture a zone in a vehicle.");
                return 
1;
            }
            
            if (
captureZone[i][E_CAPTURE_ZONE_ATTACKER] == INVALID_PLAYER_ID// this check tells us that gangzone is not under attack so we can proceed with start attacking here!
            
{
                if ((
GetPlayerTeam(playerid) >= && GetPlayerTeam(playerid) < sizeof TEAM) && TEAM[GetPlayerTeam(playerid)][E_TEAM_VALID] && GetPlayerTeam(playerid) != captureZone[i][E_CAPTURE_ZONE_OWNER]) // here the team ids play its role, we check the index is valid - The second part is if whether the player isn't of team that zone owner is 
                
{
                    
captureZone[i][E_CAPTURE_ZONE_ATTACKER] = playerid;
                    
captureZone[i][E_CAPTURE_ZONE_PLAYERS_IN_ZONE] = 1;
                    
captureZone[i][E_CAPTURE_ZONE_COUNTDOWN] = 0;
                    
KillTimer(captureZone[i][E_CAPTURE_ZONE_TIMER]);
                    
captureZone[i][E_CAPTURE_ZONE_TIMER] = SetTimerEx("OnCaptureZoneUpdate"1000true"i"i);

                    
// falsh gangzone for all
                    
GangZoneFlashForAll(captureZone[i][E_CAPTURE_ZONE_GANGZONE], ALPHA(TEAM[GetPlayerTeam(playerid)][E_TEAM_COLOR], 100));
                    
                    
// display capture message to player
                    
SendClientMessage(playeridCOLOR_GREEN"Stay in the checkpoint to for "#CAPTURE_TIME" seconds to capture the zone.");
                    
                    // display provocation message to all
                    
new string[150];
                    
format(stringsizeof string"%s is trying to capture %s away from team %s."TEAM[GetPlayerTeam(playerid)][E_TEAM_NAME], captureZone[i][E_CAPTURE_ZONE_NAME], TEAM[captureZone[i][E_CAPTURE_ZONE_OWNER]][E_TEAM_NAME]);
                    
SendClientMessageToAll(COLOR_TOMATOstring);
                }
                else return 
1;
            }
            else if (
GetPlayerTeam(playerid) == GetPlayerTeam(captureZone[i][E_CAPTURE_ZONE_ATTACKER])) // already being captured and player is of the same team that of attacker is
            
{
                
// increase number of players capturing
                
captureZone[i][E_CAPTURE_ZONE_PLAYERS_IN_ZONE]++;

                
SendClientMessage(playeridCOLOR_GREEN"Stay in the checkpoint to assist your teammate in capturing the zone.");
            }

            
// show progress bar and capture textdraw!
            
PlayerTextDrawShow(playeridcapturePlayerTextDraw[playerid]);
            
ShowPlayerProgressBar(playeridcapturePlayerBar[playerid]);
            return 
1;
        }
    }
    return 
1;

Timer:
This is the main part!
PHP Code:
forward OnCaptureZoneUpdate(zoneid);
public 
OnCaptureZoneUpdate(zoneid)
{
    
// the zone capture rate depends on the number of players capturing it
    // so if its "1", the capture time taken will be 30s
    // if its "2", the capture time decreases to half i.e. 15s
    // given you set the CAPTURE_TIME to 30
    
captureZone[zoneid][E_CAPTURE_ZONE_COUNTDOWN] += captureZone[zoneid][E_CAPTURE_ZONE_PLAYERS_IN_ZONE];

    new 
string[150];
    
format(stringsizeof string"Capturing Zone In %i..."CAPTURE_TIME captureZone[zoneid][E_CAPTURE_ZONE_COUNTDOWN]);
    
    
// update progress bar and textdraw for all players capturing
    
for (new iGetPlayerPoolSize(); <= ji++)
    {
         if (
IsPlayerInDynamicCP(icaptureZone[zoneid][E_CAPTURE_ZONE_CP]) &&
             !
IsPlayerInAnyVehicle(i) &&
             
GetPlayerTeam(i) == GetPlayerTeam(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER]))
        {
            
PlayerTextDrawSetString(icapturePlayerTextDraw[i], string);
            
SetPlayerProgressBarValue(icapturePlayerBar[i], captureZone[zoneid][E_CAPTURE_ZONE_COUNTDOWN]);
          }
    }
    
    
// zone has been captured
    
if (captureZone[zoneid][E_CAPTURE_ZONE_COUNTDOWN] > CAPTURE_TIME)
    {
        
GetPlayerName(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER], stringMAX_PLAYER_NAME);
        
format(stringsizeof string"Good job. You assisted %s to capture %s. +$250"stringcaptureZone[zoneid][E_CAPTURE_ZONE_NAME]);

        for (new 
iGetPlayerPoolSize(); <= ji++)
        {
             if (
IsPlayerInDynamicCP(icaptureZone[zoneid][E_CAPTURE_ZONE_CP]) &&
                 !
IsPlayerInAnyVehicle(i) &&
                 
GetPlayerTeam(i) == GetPlayerTeam(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER]))
            {
                
PlayerTextDrawHide(icapturePlayerTextDraw[i]);
                
HidePlayerProgressBar(icapturePlayerBar[i]);
                
                
// giving reward to teammates who assisted
                
if (!= captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER])
                {
                    
SendClientMessage(iCOLOR_GREENstring);
                    
GivePlayerMoney(i250);
                }
              }
        }
        
        
// giving reward to the attacker who startd capturing initially
        
SetPlayerScore(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER], GetPlayerScore(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER]) + 1);
        
GivePlayerMoney(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER], 1000);
        
format(stringsizeof string"Good job. You successfully captured %s from %s. +1 Score, +$1000"captureZone[zoneid][E_CAPTURE_ZONE_NAME], TEAM[captureZone[zoneid][E_CAPTURE_ZONE_OWNER]][E_TEAM_NAME]);
        
SendClientMessage(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER], COLOR_GREENstring);
        
        
// announcing capture to all players
        
format(stringsizeof string"<Capture Zone>: Team %s have captured %s from %s."TEAM[GetPlayerTeam(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER])][E_TEAM_NAME], captureZone[zoneid][E_CAPTURE_ZONE_NAME], TEAM[captureZone[zoneid][E_CAPTURE_ZONE_OWNER]][E_TEAM_NAME]);
        
SendClientMessageToAll(-1string);

        
// reset capture zone variables and modify Owner to attacker's team id
        
captureZone[zoneid][E_CAPTURE_ZONE_OWNER] = GetPlayerTeam(captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER]);
        
captureZone[zoneid][E_CAPTURE_ZONE_ATTACKER] = INVALID_PLAYER_ID;
          
KillTimer(captureZone[zoneid][E_CAPTURE_ZONE_TIMER]);
        
GangZoneStopFlashForAll(captureZone[zoneid][E_CAPTURE_ZONE_GANGZONE]);
        
GangZoneShowForAll(captureZone[zoneid][E_CAPTURE_ZONE_GANGZONE], ALPHA(TEAM[captureZone[zoneid][E_CAPTURE_ZONE_OWNER]][E_TEAM_COLOR], 100));
    }
     return 
1;

Step9: Canceling Capture
This part is for what happens when a player leaves the capture checkpoint while capturing...
PHP Code:
public OnPlayerLeaveDynamicCP(playeridcheckpointid)
{
    for (new 
isizeof captureZonei++)
    {
        if (
checkpointid == captureZone[i][E_CAPTURE_ZONE_CP])
        {
            if (
captureZone[i][E_CAPTURE_ZONE_ATTACKER] != INVALID_PLAYER_ID)
            {
                if (
GetPlayerTeam(playerid) == GetPlayerTeam(captureZone[i][E_CAPTURE_ZONE_ATTACKER]))
                {
                    
// hide progress bar and textdraw
                    
PlayerTextDrawHide(playeridcapturePlayerTextDraw[playerid]);
                    
HidePlayerProgressBar(playeridcapturePlayerBar[playerid]);
            
                    
captureZone[i][E_CAPTURE_ZONE_PLAYERS_IN_ZONE]--;
                    
                    if (
captureZone[i][E_CAPTURE_ZONE_PLAYERS_IN_ZONE] == 0// if there is no one left in capture checkpoint but the zone was still being captured
                    
{
                        
// stop capture and reset it to the team it was before
                        
captureZone[i][E_CAPTURE_ZONE_ATTACKER] = INVALID_PLAYER_ID;
                          
KillTimer(captureZone[i][E_CAPTURE_ZONE_TIMER]);
                        
GangZoneStopFlashForAll(captureZone[i][E_CAPTURE_ZONE_GANGZONE]);
                        
                        
SendClientMessage(playeridCOLOR_TOMATO"You failed to capture the zone. You left the checkpoint before time!");
                    }
                    else 
                    {
                        if (
playerid == captureZone[i][E_CAPTURE_ZONE_ATTACKER]) // if the main player who started capturing initially left
                        
{
                            
// we will select another player who is in capture checkpoint and set him as the main attacker
                            // since attackers recieve bigger reward
                            
for (new xGetPlayerPoolSize(); <= yx++)
                            {
                                 if (
IsPlayerInDynamicCP(xcaptureZone[i][E_CAPTURE_ZONE_CP]) &&
                                     !
IsPlayerInAnyVehicle(x) &&
                                     
GetPlayerTeam(x) == GetPlayerTeam(captureZone[i][E_CAPTURE_ZONE_ATTACKER]))
                                {
                                    
captureZone[i][E_CAPTURE_ZONE_ATTACKER] = x;
                                    
                                    new 
string[150];
                                    
GetPlayerName(playeridstringMAX_PLAYER_NAME);
                                    
format(stringsizeof string"%s is no longer the initial zone attacker. You are now holding that position."string);
                                    
SendClientMessage(xCOLOR_TOMATOstring);
                                    
SendClientMessage(xCOLOR_TOMATO"Stay in checkpoint to finish capture and recieve maximum reward.");
                                    
                                    
GetPlayerName(xstringMAX_PLAYER_NAME);
                                    
format(stringsizeof string"You left the checkpoint before time! You are no longer the initial capturer, %s is!"string);
                                    
SendClientMessage(playeridCOLOR_TOMATOstring);
                                    break;
                                  }
                            }
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_TOMATO"You left the checkpoint before time! You are no longer assisting your teammates in capturing!");
                        }
                    }
                }
            }
        }
    }
    return 
1;

Step10: Exiting
We simply destroy what we made in Initializing step.
Also, if you are using filterscript, use OnFilterScriptExit.
PHP Code:
public OnGameModeExit()
{
    for (new 
isizeof captureZonei++)
    {
        
GangZoneDestroy(captureZone[i][E_CAPTURE_ZONE_GANGZONE]);

        
DestroyDynamicCP(captureZone[i][E_CAPTURE_ZONE_CP]);
        
DestroyDynamicArea(captureZone[i][E_CAPTURE_ZONE_AREA]);
    }
    return 
1;

That's it, you are done!
If you have any questions, feel free to ask them here in this thread!
__________________

My GitHub:


Last edited by Gammix; 07/01/2018 at 09:27 PM.
Gammix is online now   Reply With Quote
Old 23/08/2015, 09:29 AM   #2
Hemeei
Big Clucker
 
Hemeei's Avatar
 
Join Date: Jul 2015
Location: United States Reputations : 2932
Posts: 132
Reputation: 5
Default Re: [New] How to make capture zone system (no more code repeating)

WOW WOW WOW !! THANK YOU BRO ;_; GUYS!!! THIS IS THE BEST CAPTURE ZONE TUTORIAL EVER !!!

NO MORE CODE REPEATING ONLY ONE LINE TO ADD !
__________________
Im quit its time to move GTA V!
Hemeei is offline   Reply With Quote
Old 23/08/2015, 09:34 AM   #3
Karan007
Gangsta
 
Karan007's Avatar
 
Join Date: Feb 2015
Posts: 573
Reputation: 67
Default Re: [New] How to make capture zone system (no more code repeating)

Thanks, great tutorial.
Karan007 is offline   Reply With Quote
Old 23/08/2015, 12:27 PM   #4
jamesmith12
Huge Clucker
 
jamesmith12's Avatar
 
Join Date: Jul 2015
Location: The Philippines
Posts: 293
Reputation: 26
Default Re: [New] How to make capture zone system (no more code repeating)

Nice tutorial bro! Keep it up , gonna use this to my gamemode
__________________
im sorry about before...
jamesmith12 is offline   Reply With Quote
Old 23/08/2015, 12:32 PM   #5
Hemeei
Big Clucker
 
Hemeei's Avatar
 
Join Date: Jul 2015
Location: United States Reputations : 2932
Posts: 132
Reputation: 5
Default Re: [New] How to make capture zone system (no more code repeating)

Hi guys this is the error that recently fix by gammix =D for people having this problem too

Quote:
C:\Program Files\GTA San Andreas\gamemodes\codnew.pwn(656) : error 017: undefined symbol "GetPlayerPoolSize"
Get latest SAMP version 0.3.7 (optional R2-1).


Quote:
C:\Program Files\GTA San Andreas\gamemodes\codnew.pwn(253) : warning 213: tag mismatch
Download This : http://pastebin.com/LnT3FXdG


Quote:
C:\Program Files\GTA San Andreas\gamemodes\codnew.pwn(684) : warning 209: function "OnPlayerEnterDynamicCP" should return a value
return 1 in this callback.

and Check some unline codes like this
PHP Code:
                  new
        
sBuffer[156]
    ; 
Thanks to gammix!
__________________
Im quit its time to move GTA V!
Hemeei is offline   Reply With Quote
Old 23/08/2015, 06:27 PM   #6
Viki
Big Clucker
 
Join Date: Jul 2015
Location: Pakistan
Posts: 58
Reputation: 1
Default Re: [New] How to make capture zone system (no more code repeating)

hey man i downloaded ur gamemode it was the best!and i was thinking how you made that bar!now u made a TUT!thanks ALOT
Viki is offline   Reply With Quote
Old 25/08/2015, 10:38 AM   #7
Cassy_
Big Clucker
 
Join Date: Aug 2012
Location: India, Chandigarh
Posts: 79
Reputation: 21
Default Re: [New] How to make capture zone system (no more code repeating)

Took me so much time to read, nice tutorial.
I would surely use this in my COD server.
__________________

________________
www.sa-mpdm.co.cc - Zombie Invasion
Scripting for some official and essential conditions( Free of cost * )
Searching for an Admin position to support gaming Rarely
If intrested PM. me


(c) Copyright 2012
Cassy_ is offline   Reply With Quote
Old 25/08/2015, 11:02 AM   #8
SEIFOUNE123
Big Clucker
 
Join Date: Dec 2012
Posts: 18
Reputation: -2
Default Re: [New] How to make capture zone system (no more code repeating)

nice, but I always prefer to use this one http://forum.sa-mp.com/showthread.php?t=534999 as it is more easy and explained
SEIFOUNE123 is offline   Reply With Quote
Old 25/08/2015, 02:15 PM   #9
jamesmith12
Huge Clucker
 
jamesmith12's Avatar
 
Join Date: Jul 2015
Location: The Philippines
Posts: 293
Reputation: 26
Default Re: [New] How to make capture zone system (no more code repeating)

nah this one is better than that ^^
__________________
im sorry about before...
jamesmith12 is offline   Reply With Quote
Old 25/08/2015, 05:05 PM   #10
HydraHumza
Gangsta
 
HydraHumza's Avatar
 
Join Date: Oct 2014
Posts: 641
Reputation: 130
Default Re: [New] How to make capture zone system (no more code repeating)

Really Nice (Y) KEEP IT UP MAN
__________________
Quote:
Originally Posted by Kalcor View Post
The fact is, I am right. And if you think I'm wrong, you are wrong.
HydraHumza 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
[Help] Capture zone dieegov Scripting Help 0 15/07/2013 10:22 PM
Capture Zone [HELP] [REP+] Pravin Scripting Help 0 02/08/2012 04:11 PM
Lots of errors with zone capture system stormchaser206 Scripting Help 16 15/07/2012 07:11 PM
Capture Zone [WTF]Godfather Scripting Help 4 17/05/2012 05:10 AM
Make This Zone Code Takable? <Weponz> Help Archive 0 25/10/2010 12:59 PM


All times are GMT. The time now is 08:06 PM.


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