Problem with capture the zone script
#1

Hey all, I'm trying to make a capture the zone script but I got into trouble. When I enter in checkpoint 0 it turns the mapicon red just as I want, but the problem is that it does the same with checkpoints 1 and 2. Here's the code


Код:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
	if(GetPlayerTeam(playerid) == TEAM_ALPHA)
	{
		IsPlayerInDynamicCP(playerid, 0);
			{
			DestroyDynamicMapIcon(0);
			CreateDynamicMapIcon(1716.4755,	-1880.6313,	14.5662, 0, ALPHA_FLAG_COLOR, 0, 0, -1, 20000, MAPICON_GLOBAL);
   			}
   		IsPlayerInDynamicCP(playerid, 1);
			{
			DestroyDynamicMapIcon(1);
			CreateDynamicMapIcon(1271.6301,	295.0983,	20.6563, 0, ALPHA_FLAG_COLOR, 0, 0, -1, 20000, MAPICON_GLOBAL);
   			}
   		IsPlayerInDynamicCP(playerid, 2);
			{
			DestroyDynamicMapIcon(2);
			CreateDynamicMapIcon(2320.1458,	61.0795,	26.4851, 0, ALPHA_FLAG_COLOR, 0, 0, -1, 20000, MAPICON_GLOBAL);
   			}
  	}
return 1;
}
Thanks in advance
Reply


Messages In This Thread
Problem with capture the zone script - by msvu - 22.05.2014, 02:10

Forum Jump:


Users browsing this thread: 1 Guest(s)