View Single Post
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