if(checkpointid == CPs[AbandonedAp])
{
if(tCP[AbandonedAp] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
if(UnderAttack[AbandonedAp] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
UnderAttack[AbandonedAp] = 1;
timer[playerid][AbandonedAp] = SetTimerEx("SetZone",30000,false,"i", playerid);
SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
iCP[playerid] = AbandonedAp;
}
if(checkpointid == CPs[AbandonedAp])
{
GameTextForPlayer(playerid, "Left CP", 1000, 3);
KillTimer(timer[playerid][AbandonedAp]);
UnderAttack[AbandonedAp] = 0;
iCP[playerid] = -1;
}
new szDebug[144];
format(szDebug, sizeof(szDebug), "OnPlayerEnterDynamicCP(%i) - %i", checkpointid, CPs[AbandonedAp]);
SendClientMessage(..);
there are some include blocking the callback from being called.
What include are you using? Can you show us your OnPlayerEnterDynamicCP. |
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CPs[0]) //Usa Team Shop
{
Shop(playerid);
}
if(checkpointid == CPs[1]) //GermanyTeamShop
{
Shop(playerid);
}
if(checkpointid == CPs[2]) //RussianTeamShop
{
Shop(playerid);
}
if(checkpointid == CPs[3]) //JapanTeamShop
{
Shop(playerid);
}
if(checkpointid == CPs[4]) //A69 Prototype CP
{
if(StealingA69Prot[playerid] == 1)
{
new playervehicleid = GetPlayerVehicleID(playerid);
if(playervehicleid == A69Prot)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
SetVehicleToRespawn(A69Prot);
GivePlayerMoney(playerid, 15000);
StealingA69Prot[playerid] = 0;
GameTextForPlayer(playerid, "You ~r~stole ~w~the ~g~Area69 Prototype ~w~!", 5000, 3);
CheckForLevelUpdate(playerid);
new pname[24];
GetPlayerName(playerid, pname, 24);
new kk[128];
format(kk, sizeof(kk), "** %s (%d) successfully stole the Area69 Prototype!",pname,playerid);
SCMTA(0xC93CCE00,kk);
new string[128];
format(string, sizeof(string), "05,8** %s (%d) successfully stole the Area69 Prototype!", pname,playerid);
IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
SetPVarInt(playerid,"StealingTime",GetTickCount()+600000);
DisablePlayerCheckpoint(playerid);
}
}
//Gangzons checkpoint
if(checkpointid == CPs[AbandonedAp])
{
if(tCP[AbandonedAp] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
if(UnderAttack[AbandonedAp] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
UnderAttack[AbandonedAp] = 1;
timer[playerid][AbandonedAp] = SetTimerEx("SetZone",30000,false,"i", playerid);
SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
iCP[playerid] = AbandonedAp;
}
}
return 1;
}
pawn Код:
What can be wrong? |
If you have that code inside your script its pretty reasonable to show the text "left cp".
|
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CPs[0]) //Usa Team Shop
{
Shop(playerid);
}
if(checkpointid == CPs[1]) //GermanyTeamShop
{
Shop(playerid);
}
if(checkpointid == CPs[2]) //RussianTeamShop
{
Shop(playerid);
}
if(checkpointid == CPs[3]) //JapanTeamShop
{
Shop(playerid);
}
if(checkpointid == CPs[4]) //A69 Prototype CP
{
if(StealingA69Prot[playerid] == 1)
{
new playervehicleid = GetPlayerVehicleID(playerid);
if(playervehicleid == A69Prot)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
SetVehicleToRespawn(A69Prot);
GivePlayerMoney(playerid, 15000);
StealingA69Prot[playerid] = 0;
GameTextForPlayer(playerid, "You ~r~stole ~w~the ~g~Area69 Prototype ~w~!", 5000, 3);
CheckForLevelUpdate(playerid);
new pname[24];
GetPlayerName(playerid, pname, 24);
new kk[128];
format(kk, sizeof(kk), "** %s (%d) successfully stole the Area69 Prototype!",pname,playerid);
SCMTA(0xC93CCE00,kk);
new string[128];
format(string, sizeof(string), "05,8** %s (%d) successfully stole the Area69 Prototype!", pname,playerid);
IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
SetPVarInt(playerid,"StealingTime",GetTickCount()+600000);
DisablePlayerCheckpoint(playerid);
}
}
}
//Gangzons checkpoint
if(checkpointid == CPs[AbandonedAp])
{
if(tCP[AbandonedAp] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
if(UnderAttack[AbandonedAp] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
UnderAttack[AbandonedAp] = 1;
timer[playerid][AbandonedAp] = SetTimerEx("SetZone",30000,false,"i", playerid);
SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
iCP[playerid] = AbandonedAp;
}
return 1;
}