SA-MP Forums Archive
CreateDynamicCP issue - 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: CreateDynamicCP issue (/showthread.php?tid=493498)



CreateDynamicCP issue - Gh0s7 - 08.02.2014

Checkpoint disappears when I enter in it, and OnPlayerLeaveDynamicCp is not called . How I can make the checkpoint to stay active all time ?

Код:
cpTeritory[ CreateDynamicCP(-1580.51, 717.117, -5.24, 2.0) ] = 2;
...

public OnPlayerEnterDynamicCP(playerid, checkpointid) {
    new Teritory = cpTeritory[ checkpointid ] ;
	if ( Teritory != 0 )
	{
	    SendClientMessage(playerid,-1,"IN");
	}
return 1;
}


public OnPlayerLeaveDynamicCP( playerid, checkpointid ) {
    new Teritory = cpTeritory[ checkpointid ];
	if ( Teritory != 0 )
	{
	    SendClientMessage(playerid,-1,"OUT");
	}
	return 1;
}
EDIT: Fixed. I removed DisablePlayerCheckpoint(playerid); from default public OnPlayerEnterCheckpoint(playerid) callback.