Author Topic: Capture zones  (Read 899 times)

Rishabh

  • Newbie
  • *
  • Posts: 12
  • Location: Delhi
    • View Profile
Re: Capture zones
« on: May 18, 2012, 01:35:59 pm »
here use this ======


new Checkpoint[MAX_PLAYERS];
public OnGameModeInit()
{
    gangzone = GangZoneCreate(min_x,min_y,max_x,max_y, );
    return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] = 1)
{
SendClientMessage(playerid,color,"You're capture the zone, please wait 20 seconds");
SetTimerEx("SetZone",20000,false,"i",playerid);
}
return 1;
}
forward SetZone(playerid);
public SetZone(playerid)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
GivePlayerCash(playerid,500);
SendClientMessage(playerid,color,"You've capture the zone and receive 500 $ and 5 score");
if (gTeam[playerid] == TEAM_Latino)
    {
        GangZoneShowForAll(gangzone,TEAM_Latino_COLOR);
    }
    else if (gTeam[playerid] == TEAM_Souviet)
    {
        GangZoneShowForAll(gangzone,TEAK_Souviet_COLOR);
    }

    else if (gTeam[playerid] == TEAM_Arabian)
    {
        GangZoneShowForAll(gangzone, TEAM_Arabian_COLOR);
     }

    else if (gTeam[playerid] == TEAM_USA)
    {
        GangZoneShowForAll(gangzone, TEAM_USA_COLOR);
     }

    else if (gTeam[playerid] == TEAM_Europian)
    {
        GangZoneShowForAll(gangzone, TEAM_Europian_COLOR);
     }

    else if (gTeam[playerid] == TEAM_Japan)
    {
        GangZoneShowForAll(gangzone, TEAM_Japan_COLOR);
     }
    else if (gTeam[playerid] == TEAM_Taliban)
    {
        GangZoneShowForAll(gangzone, TEAM_Taliban_COLOR);
     }
return 1;
}


for the coordinates of xmin/xmax/ymin/ymax/etc use mademan tutorials or use sa-mp debug mode....