help with checkpoints
#1

Hello i made set of checkpoints but they are not working properly can some1 tell my why
okay hare is my onplayerentercp

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CP[playerid] == 1001)
	{
	    SetPlayerCheckpoint(playerid, 2864.5,1319.3,10.8, 3.0);
	    CP[playerid] = 1002;
	}
    if(CP[playerid] == 1002)
	{
	    SetPlayerCheckpoint(playerid, 1412.7,2632.3999,10.8, 3.0);
	    CP[playerid] = 1003;
	}
	if(CP[playerid] == 1003)
	{
	    SetPlayerCheckpoint(playerid, -1944.3,130.89999,25.7, 3.0);
	    CP[playerid] = 1004;
	}
	if(CP[playerid] == 1004)
	{
	    SetPlayerCheckpoint(playerid, 824.20001,-1375.4,-1.7, 3.0);
	    CP[playerid] = 1005;
	}
	if(CP[playerid] == 1005)
	{
        SetPlayerCheckpoint(playerid, 1759.4,-1953.9,13.5, 3.0);
	    CP[playerid] = 1001;
	}
and hare is my onplayerentervehicle
Код:
if(vehicleid == TRAINDRIVE[0])
					{
						if(CP[playerid] != 1001 && CP[playerid] != 1002 && CP[playerid] != 1003 && CP[playerid] != 1004 && CP[playerid] != 1005)
						{
                            SetPlayerCheckpoint(playerid, 2864.5,1319.3,10.8, 3.0);
							CP[playerid] = 1002;
						}
					}
					else if(vehicleid == TRAINDRIVE[1])
					{
                        if(CP[playerid] != 1001 && CP[playerid] != 1002 && CP[playerid] != 1003 && CP[playerid] != 1004 && CP[playerid] != 1005)
						{
                            SetPlayerCheckpoint(playerid, -1944.3,130.89999,25.7, 3.0);
							CP[playerid] = 1004;
						}
					}
					else if(vehicleid == TRAINDRIVE[2])
					{
                        if(CP[playerid] != 1001 && CP[playerid] != 1002 && CP[playerid] != 1003 && CP[playerid] != 1004 && CP[playerid] != 1005)
						{
                            SetPlayerCheckpoint(playerid, 824.20001,-1375.4,-1.7, 3.0);
							CP[playerid] = 1005;
						}
					}
so what the problem . okay i test this with TRAINDRIVE[0] when player enters to the vehicle its gives second checkpoint i set ( that good) but when i enter second checkpoint its gives my first one and i have set to give third one , ware could be a problem ?
Reply
#2

Actually, you need to put:

pawn Код:
return 1;
}
After every CP.
And try to disable them checkpoints, them show 'em again.
Reply
#3

You can remove that CP and use player range point. It is easier and faster. Or return 1 after each CP
Reply
#4

you meen like this on each of them ?
Код:
if(CP[playerid] == 1001)
	{
            DisablePlayerCheckpoint(playerid);
	    SetPlayerCheckpoint(playerid, 2864.5,1319.3,10.8, 3.0);
	    CP[playerid] = 1002;
            return 1;
	}
Quote:
Originally Posted by Clad
Посмотреть сообщение
You can remove that CP and use player range point. It is easier and faster. Or return 1 after each CP
when u said range points i think about and realy get confused hot to do this , you meen something like when player enter vehicle set cp and then check if player is in that checkpoint range disable that checkpoint and give another one ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)