SA-MP Forums Archive
When I Enter The CP Nothing Happens - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: When I Enter The CP Nothing Happens (/showthread.php?tid=623767)



When I Enter The CP Nothing Happens - Speaker - 05.12.2016

As The Topic says when i enter the Cp nothing happens please help me to fix it here is my code
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP[NPP])
	{
		if(Spectating[playerid] == 0) {
			if(UnderAttack[NPP] == 0) {
				if(PlayerInfo[playerid][OnDuty] == 0) {
					if(tCP[NPP] != gTeam[playerid]) {
						CountVar[playerid][NPP] = 25;
						ActiveNPP(playerid);
					} else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
				} else return CaptureZoneMessage(playerid, 3);
			} else return CaptureZoneMessage(playerid, 2);
		} else return 0;
	}
	return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
	if(checkpointid == CP[NPP] && Captured[playerid][NPP] == 0 && IsPlayerCapturing[playerid][NPP] == 1 && !IsPlayerInDynamicCP(playerid, CP[NPP]))
	{
		LeavingNuclear(playerid);
	}