Help In Onplayerleavedynamiccp -
Youssef214 - 29.04.2014
The Bug Is When I Leave The Police Checkpoint Doesn't Send Me Any Message On These Codes:
pawn Код:
else if(checkpointid == Police)
{
if(tCP[Police] == gTeam[playerid])
{
SendClientMessage(playerid, 0x00FF007A, " Capture Your Enemies' Zones,You Will Get Money And Score");
}
else
{
SendClientMessage(playerid, 0x00FF007A, " You have left the checkpoint , You have failed to capture");
GangZoneStopFlashForAll(Police);
SendClientMessageToAll(0x00FF007A, "Police GangZone was not taken over");
KillTimer(timer[playerid][Police]);
Checkpoint[playerid] = 0;
UnderAttack[Police] = 0;
}
}
Please Help.
Re: Help In Onplayerleavedynamiccp -
iFarbod - 29.04.2014
GangZone and The Checkpoint has the same name? 'Police' ?
Re: Help In Onplayerleavedynamiccp -
Youssef214 - 29.04.2014
Police Checkpoint is in the police gangzone,but in other checkpoints everything is fine,full list of onplayerleavedynmaiccp:
pawn Код:
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == Grove)
{
if(tCP[Grove] == gTeam[playerid])
{
SendClientMessage(playerid, 0x00FF007A, " Capture Your Enemies' Zones,You Will Get Money And Score");
}
else
{
SendClientMessage(playerid, 0x00FF007A, "You have left the checkpoint , You have failed to capture");
GangZoneStopFlashForAll(Grove);
SendClientMessageToAll(0x00FF007A, "Grove GangZone was not taken over");
KillTimer(timer[playerid][Grove]);
Checkpoint[playerid] = 0;
UnderAttack[Grove] = 0;
}
}
else if(checkpointid == Ballas)
{
if(tCP[Ballas] == gTeam[playerid])
{
SendClientMessage(playerid, 0x00FF007A, " Capture Your Enemy's Zones,You Will Get Money And Score");
}
else
{
SendClientMessage(playerid, 0x00FF007A, " You have left the checkpoint , You have failed to capture");
GangZoneStopFlashForAll(Ballas);
SendClientMessageToAll(0x00FF007A, "Ballas GangZone was not taken over");
KillTimer(timer[playerid][Ballas]);
Checkpoint[playerid] = 0;
UnderAttack[Ballas] = 0;
}
}
else if(checkpointid == Vagos)
{
if(tCP[Vagos] == gTeam[playerid])
{
SendClientMessage(playerid, 0x00FF007A, " Capture Your Enemies' Zones,You Will Get Money And Score");
}
else
{
SendClientMessage(playerid, 0x00FF007A, " You have left the checkpoint , You have failed to capture");
GangZoneStopFlashForAll(Vagos);
SendClientMessageToAll(0x00FF007A, "Vagos GangZone was not taken over");
KillTimer(timer[playerid][Vagos]);
Checkpoint[playerid] = 0;
UnderAttack[Vagos] = 0;
}
}
else if(checkpointid == Aztecas)
{
if(tCP[Aztecas] == gTeam[playerid])
{
SendClientMessage(playerid, 0x00FF007A, " Capture Your Enemies' Zones,You Will Get Money And Score");
}
else
{
SendClientMessage(playerid, 0x00FF007A, " You have left the checkpoint , You have failed to capture");
GangZoneStopFlashForAll(Aztecas);
SendClientMessageToAll(0x00FF007A, "Aztecas GangZone was not taken over");
KillTimer(timer[playerid][Aztecas]);
Checkpoint[playerid] = 0;
UnderAttack[Aztecas] = 0;
}
}
else if(checkpointid == Police)
{
if(tCP[Police] == gTeam[playerid])
{
SendClientMessage(playerid, 0x00FF007A, " Capture Your Enemies' Zones,You Will Get Money And Score");
}
else
{
SendClientMessage(playerid, 0x00FF007A, " You have left the checkpoint , You have failed to capture");
GangZoneStopFlashForAll(Police);
SendClientMessageToAll(0x00FF007A, "Police GangZone was not taken over");
KillTimer(timer[playerid][Police]);
Checkpoint[playerid] = 0;
UnderAttack[Police] = 0;
}
}
return 1;
}
Re: Help In Onplayerleavedynamiccp -
iFarbod - 29.04.2014
Can you post the onplayerentercp
Re: Help In Onplayerleavedynamiccp -
Youssef214 - 29.04.2014
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == GTurf)
{
if(tCP[Grove] == gTeam[playerid]) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already captured by your team");
if(UnderAttack[Grove] == 1) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already being taken over!");
UnderAttack[Grove] = 1;
timer[playerid][Grove] = SetTimerEx("G",60000,false,"i", playerid);
SendClientMessage(playerid, 0xFFFB00FF,"You're Capturing this zone! Wait here for 60 Seconds!");
GangZoneFlashForAll(Grove,GetPlayerColor(playerid));
new string[128];
format(string, sizeof(string),"[ATTENTION]: Grove Gangzone is Being taken Over!");
SendClientMessageToAll(0xF50A0AFF,string);
iCP[playerid] = Grove;
}
if(checkpointid == BTurf)
{
if(tCP[Ballas] == gTeam[playerid]) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already captured by your team");
if(UnderAttack[Ballas] == 1) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already being taken over!");
UnderAttack[Ballas] = 1;
timer[playerid][Ballas] = SetTimerEx("B",60000,false,"i", playerid);
SendClientMessage(playerid, 0xFFFB00FF,"You're Capturing this zone! Wait here for 60 Seconds!");
GangZoneFlashForAll(Ballas,GetPlayerColor(playerid));
new string[128];
format(string, sizeof(string),"[ATTENTION]: Ballas Gangzone is Being taken Over!");
SendClientMessageToAll(0xF50A0AFF,string);
iCP[playerid] = Ballas;
}
if(checkpointid == ATurf)
{
if(tCP[Aztecas] == gTeam[playerid]) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already captured by your team");
if(UnderAttack[Aztecas] == 1) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already being taken over!");
UnderAttack[Aztecas] = 1;
timer[playerid][Aztecas] = SetTimerEx("A",60000,false,"i", playerid);
SendClientMessage(playerid, 0xFFFB00FF,"You're Capturing this zone! Wait here for 60 Seconds!");
GangZoneFlashForAll(Aztecas,GetPlayerColor(playerid));
new string[128];
format(string, sizeof(string),"[ATTENTION]: Aztecas Gangzone is Being taken Over!");
SendClientMessageToAll(0xF50A0AFF,string);
iCP[playerid] = Aztecas;
}
if(checkpointid == VTurf)
{
if(tCP[Vagos] == gTeam[playerid]) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already captured by your team");
if(UnderAttack[Vagos] == 1) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already being taken over!");
UnderAttack[Vagos] = 1;
timer[playerid][Vagos] = SetTimerEx("V",60000,false,"i", playerid);
SendClientMessage(playerid, 0xFFFB00FF,"You're Capturing this zone! Wait here for 60 Seconds!");
GangZoneFlashForAll(Vagos,GetPlayerColor(playerid));
new string[128];
format(string, sizeof(string),"[ATTENTION]: Vagos Gangzone is Being taken Over!");
SendClientMessageToAll(0xF50A0AFF,string);
iCP[playerid] = Vagos;
}
if(checkpointid == PTurf)
{
if(tCP[Police] == gTeam[playerid]) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already captured by your team");
if(UnderAttack[Police] == 1) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already being taken over!");
UnderAttack[Police] = 1;
timer[playerid][Police] = SetTimerEx("P",60000,false,"i", playerid);
SendClientMessage(playerid, 0xFFFB00FF,"You're Capturing this zone! Wait here for 60 Seconds!");
GangZoneFlashForAll(Police,GetPlayerColor(playerid));
new string[128];
format(string, sizeof(string),"[ATTENTION]: Police Gangzone is Being taken Over!");
SendClientMessageToAll(0xF50A0AFF,string);
iCP[playerid] = Police;
}
return 1;
}
Re: Help In Onplayerleavedynamiccp -
Youssef214 - 29.04.2014
Fixed It By Myself.
Re: Help In Onplayerleavedynamiccp -
iFarbod - 29.04.2014
When you leave the checkpoint, timers also not stop??