SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 31/05/2012, 08:24 AM   #1
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default [HELP]Gang Zone Capture

ok For Example here is the gangzone
pawn Code:
new gangzone;
 
public OnGameModeInit()
{
    gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
    return 1;
}
 
public OnPlayerSpawn(playerid)
{
    if(IsPlayerAdmin(playerid)) GangZoneShowForAll(gangzone,COLOR_RED);
    return 1;
}

And here is the checkpoint
pawn Code:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    GivePlayerMoney(playerid, 5000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
now i want if some one comes in checkpoint and stays 30 secs and caps and and get 5 score + 5000 money and gangzone color =his team
the_zohan is offline   Reply With Quote
Old 31/05/2012, 08:26 AM   #2
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default Re: [HELP]Gang Zone Capture

these are teams + colors

pawn Code:
#define TEAM_USA 1
#define TEAM_COLOR_USA COLOR_BLUE
#define TEAM_JAPAN 2
#define TEAM_COLOR_JAPAN COLOR_WHITE
#define TEAM_GERMANY 3
#define TEAM_COLOR_GERMANY COLOR_BROWN
#define TEAM_RUSSIA 4
#define TEAM_COLOR_RUSSIA COLOR_RED
#define TEAM_ENGLAND 5
#define TEAM_COLOR_ENGLAND COLOR_PLUM
#define TEAM_MEXICO 6
#define TEAM_COLOR_MEXICO COLOR_LIMEGREEN
#define TEAM_INDIA 7
#define TEAM_COLOR_INDIA COLOR_CORAL
#define TEAM_BRAZIL 8
#define TEAM_COLOR_BRAZIL COLOR_AQUA
#define TEAM_FRANCE 9
#define TEAM_COLOR_FRANCE COLOR_INDIGO
#define TEAM_INDONESIA 10
#define TEAM_COLOR_INDONESIA COLOR_BISQUE
the_zohan is offline   Reply With Quote
Old 31/05/2012, 08:32 AM   #3
badnum23
Little Clucker
 
badnum23's Avatar
 
Join Date: May 2012
Posts: 15
Reputation: 1
Default Re: [HELP]Gang Zone Capture

Create a function that will give money, score and new property to player.
For example:
Code:
forward gangZoneComplete(playerid);
public gangZoneComplete(playerid)
{
	GivePlayerMoney(playerid, 5000);
	//Up score
	//setup zone
       DisablePlayerCheckpoint(playerid);
}
Next
Code:
public OnPlayerEnterCheckpoint(playerid)
{
    new timerId = setTimerEx("gangZoneComplete", 1000 * 30, false, "i", playerid);
    SetPVarInt(playerid, "gangZoneTimer", timerId);
    SetPVarInt(playerid, "onGangZone", 1);
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    if (GetPVarInt(playerid, "onGangZone")
        KillTimer(GetPVarInt(playerid, "gangZoneTimer"));
    DelPVar(playerid, "onGangZone");
    DelPVar(playerid, "gangZoneTimer");
}
badnum23 is offline   Reply With Quote
Old 31/05/2012, 08:47 AM   #4
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default Re: [HELP]Gang Zone Capture

u mean this?
pawn Code:
#define TEAM_USA 1
#define TEAM_COLOR_USA COLOR_BLUE
#define TEAM_JAPAN 2
#define TEAM_COLOR_JAPAN COLOR_WHITE
#define TEAM_GERMANY 3
#define TEAM_COLOR_GERMANY COLOR_BROWN
#define TEAM_RUSSIA 4
#define TEAM_COLOR_RUSSIA COLOR_RED
#define TEAM_ENGLAND 5
#define TEAM_COLOR_ENGLAND COLOR_PLUM
#define TEAM_MEXICO 6
#define TEAM_COLOR_MEXICO COLOR_LIMEGREEN
#define TEAM_INDIA 7
#define TEAM_COLOR_INDIA COLOR_CORAL
#define TEAM_BRAZIL 8
#define TEAM_COLOR_BRAZIL COLOR_AQUA
#define TEAM_FRANCE 9
#define TEAM_COLOR_FRANCE COLOR_INDIGO
#define TEAM_INDONESIA 10
#define TEAM_COLOR_INDONESIA COLOR_BISQUE

new gangzone;
 
public OnGameModeInit()
{
    gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
    return 1;
}
 
public OnPlayerSpawn(playerid)
{
    if(IsPlayerAdmin(playerid)) GangZoneShowForAll(gangzone,COLOR_RED);
forward gangZoneComplete(playerid);
public gangZoneComplete(playerid)
{
    GivePlayerMoney(playerid, 5000);
    //Up score
    //setup zone
}
    return 1;
}
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
{
    new timerId = setTimerEx("gangZoneComplete", 1000 * 30, false, "i", playerid);
    SetPVarInt(playerid, "gangZoneTimer", timerId);
    SetPVarInt(playerid, "onGangZone", 1);
 
}


public OnPlayerLeaveCheckpoint(playerid)
{
    if (GetPVarInt(playerid, "onGangZone")
        KillTimer(GetPVarInt(playerid, "gangZoneTimer"));
    DelPVar(playerid, "onGangZone");
    DelPVar(playerid, "gangZoneTimer");
}
    GivePlayerMoney(playerid, 5000);
    GivePlayerScore(playerid,5);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
now how can gang zone change when a team member captures and gangzone color changes to its team color
the_zohan is offline   Reply With Quote
Old 01/06/2012, 05:33 AM   #5
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default Re: [HELP]Gang Zone Capture

/bump
fall on 3-4th page
the_zohan is offline   Reply With Quote
Old 01/06/2012, 05:57 AM   #6
FearLe$$
Little Clucker
 
FearLe$$'s Avatar
 
Join Date: May 2012
Posts: 31
Reputation: 5
Default Re: [HELP]Gang Zone Capture

BTW zohan after getting Banned From COD5 Community, trying to make a community?

NVM.. if u have a server im a free scripter..
FearLe$$ is offline   Reply With Quote
Old 01/06/2012, 03:49 PM   #7
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default Re: [HELP]Gang Zone Capture

my community? never and this is for a freind
the_zohan is offline   Reply With Quote
Old 03/06/2012, 03:13 AM   #8
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default Re: [HELP]Gang Zone Capture

bump fell on 6th page
the_zohan is offline   Reply With Quote
Old 03/06/2012, 03:17 AM   #9
FearLe$$
Little Clucker
 
FearLe$$'s Avatar
 
Join Date: May 2012
Posts: 31
Reputation: 5
Default Re: [HELP]Gang Zone Capture

u should take a start from a GM ill suggest to use CODMW its has toooo many capture zones and u get 5000$ and 5 Score + its has Classes and Stuff like Nuke..
FearLe$$ is offline   Reply With Quote
Old 03/06/2012, 03:23 AM   #10
the_zohan
Big Clucker
 
Join Date: Apr 2012
Posts: 123
Reputation: 1
Default Re: [HELP]Gang Zone Capture

send me the link of gm via pm
the_zohan 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
[Include] [INC] LGZ 1.3.2 [REL: 11 Jan 2008] | Let's capture the zone! [LDT]LuxurY Includes 106 08/03/2013 04:42 AM
Capture Zone [WTF]Godfather Scripting Help 4 17/05/2012 05:10 AM
Creating Gang zones for capture Johny_Vett Scripting Help 10 19/12/2011 06:16 PM
[AJUDA]Gang Zone DOminaveis ( o meu possui /gang criar) rene20 PortuguÍs/Portuguese 2 22/09/2010 05:55 PM
Capture a gang zone. oded050 Help Archive 3 07/08/2010 12:17 PM


All times are GMT. The time now is 08:58 AM.


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