OnPlayerEnterDynamicCp
#1

Hi, I wanted to test the callback OnPlayerEnterDynamicCp, but when I enter in the checkpoint, nothing happen..

Here's my code :



Top of the script :

Код:
new ordi1;
new ordi2;
new ordi3;
new ordi4;
OnGameModeInit() :

Код:
ordi1 = CreateDynamicCP(337.4386,197.7973,1014.7152, -1, -1, -1, -1, 100);
Then the callback OnPlayerEnterDynamicCheckpoint(playerid, streamid) :

Код:
public OnPlayerEnterDynamicCheckpoint(playerid, streamid)
{

	if(IsPlayerInDynamicCP(playerid, ordi1) && gTeam[playerid] == NINJA)
	{
		DestroyDynamicCP(ordi1);
		
		ordi2 = CreateDynamicCP(356.4801,162.1948,1019.9844,10,-1,-1,-1,100.0);
	}

	else if(IsPlayerInDynamicCP(playerid, ordi2) && gTeam[playerid] == NINJA)
	{
		DestroyDynamicCP(ordi2);
		ordi2 = CreateDynamicCP(364.1272,152.5401,1025.7964,10,-1,-1,-1,100.0);

	}

	else if(IsPlayerInDynamicCP(playerid, ordi3) && gTeam[playerid] == NINJA)
	{
		DestroyDynamicCP(ordi3);
		ordi4 = CreateDynamicCP(353.6466,171.4531,1025.7964,10,-1,-1,-1,100.0);

	}

	else if(IsPlayerInDynamicCP(playerid, ordi4) && gTeam[playerid] == NINJA)
	{
		GameTextForAll("~r~WOW !",1000,5);

	}

}
Reply


Messages In This Thread
OnPlayerEnterDynamicCp - by kurt225 - 14.07.2013, 18:59
Re : OnPlayerEnterDynamicCp - by kurt225 - 14.07.2013, 19:47
Re: OnPlayerEnterDynamicCp - by exclide1 - 14.07.2013, 20:00
Re : OnPlayerEnterDynamicCp - by kurt225 - 14.07.2013, 20:47
Re : OnPlayerEnterDynamicCp - by kurt225 - 14.07.2013, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)