Turf Wars A little Help
#1

Hello, I made my own Turf Wars System .... It has a Timer That on player Enter Checkpoint he Waits for 15 sec to Take Over the Turf .
But iwant to make it like after 15 sec he starts to take over turf he waits for 1 min .and he have to stay in the zone ALIVE for 1 min .
Any hints for that ?
Quote:

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == GrovePoint[GZONE])
{
// if(tCP[GZONE] == gTeam[playerid]) return SendClientMessage(playerid,0xFFFFFF,"This is already captured by your team.");
if(gTeam[playerid] == tCP[GZONE]) return SendClientMessage(playerid,0xFFFFFF,"This turf is already captured by your team.");
timer[playerid][GZONE] = SetTimerEx("SetZone",15000,false,"i",playerid);
SendClientMessage(playerid,0xFFFFFF,"Wait for 15 sec to start a Turf war Against Groves");
iCP[playerid] = GZONE;
}
/* if(checkpointid == Checkpoint[GAS])
{
if(tCP[GAS] == gTeam[playerid]) return SendClientMessage(playerid,0xFFFFFF,"This is already captured by your team.");
timer[playerid][GAS] = SetTimerEx("SetZone",2000,false,"i",playerid);
SendClientMessage(playerid,0xFFFFFF,"You enter GAS CP");
iCP[playerid] = GAS;
}
*/
return 1;
}

public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == GrovePoint[GZONE])
{
KillTimer(timer[playerid][GZONE]);
iCP[playerid] = -1;//None
}
/* if(checkpointid == Checkpoint[GAS])
{
KillTimer(timer[playerid][GAS]);
SendClientMessage(playerid,0xFFFFFF,"You left GAS CP");
iCP[playerid] = -1;
}
*/
return 1;
}
forward SetZone(playerid);
public SetZone(playerid)
{
//SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
//GivePlayerMoney(playerid,3000);
SendClientMessage(playerid,COLOR_GREEN,"You started a Turf War Against Groves Stay in the Zone For 1 Min To take Over ");
// SetGangZone(playerid);
return 1;
}
forward SetGangZone(playerid);public SetGangZone(playerid)
{
if(gTeam[playerid] == TEAM_GROVE)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_GREEN);

new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Grove %s Has Taken Back Their Turf ",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_AZTECA)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_LIGHTBLUE);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Aezateca %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_POLICE)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_BLUE);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Police %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_BALLAS)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_PURPLE);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Balla %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_TRIADS)
{
GangZoneShowForAll(GroveZone[GZONE],RED);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Triad %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_VAGOS)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_YELLOW);

new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Vago %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_DANANG)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_OLIVE);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"DaNang %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

if(gTeam[playerid] == TEAM_MAFIA)
{
GangZoneShowForAll(GroveZone[GZONE],COLOR_MAROON);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Mafia %s Has Started a Turf War In Grove (Turf id '1')",pName);
SendClientMessageToAll(0x008000AA,string);
}

return 1;
}

Reply


Messages In This Thread
Turf Wars A little Help - by Mr.Faqahat - 22.01.2013, 11:47
Re: Turf Wars A little Help - by denNorske - 22.01.2013, 11:56
Re: Turf Wars A little Help - by Mr.Faqahat - 22.01.2013, 12:05
Re: Turf Wars A little Help - by denNorske - 22.01.2013, 12:13
Re: Turf Wars A little Help - by Mr.Faqahat - 22.01.2013, 13:40
Re: Turf Wars A little Help - by DaRk_RaiN - 22.01.2013, 14:01

Forum Jump:


Users browsing this thread: 2 Guest(s)