[HELP]Last Checkpoint not disappering and Money isn't comming
#1

Hello all , So i made this race.. And when the player reach the last cp , it is not going , and he isn't getting $75

Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 5, -1145.5658,-1045.6901,128.5027))

	{
		SetPlayerRaceCheckpoint(playerid, 0, -1183.2870,-1002.4471,128.5025, -1172.3785,-988.5954,128.5025, 5);

	}
    if(IsPlayerInRangeOfPoint(playerid, 5, -1183.2870,-1002.4471,128.5025))

	{
		SetPlayerRaceCheckpoint(playerid, 0, -1172.3785,-988.5954,128.5025, -1129.6694,-1018.2800,128.5025, 5);

	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1172.3785,-988.5954,128.5025))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1129.6694,-1018.2800,128.5025,-1098.4072,-1057.1410,128.4954,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1129.6694,-1018.2800,128.5025))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1098.4072,-1057.1410,128.4954,-1045.0264,-1022.5968,128.4956,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1098.4072,-1057.1410,128.4954))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1045.0264,-1022.5968,128.4956,-1011.6423,-980.4113,128.5025,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1045.0264,-1022.5968,128.4956))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1011.6423,-980.4113,128.5025,-1035.6104,-953.7844,128.5026,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1011.6423,-980.4113,128.5025))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1035.6104,-953.7844,128.5026,-1081.0226,-997.9811,128.5026,5);
	}

    if(IsPlayerInRangeOfPoint(playerid, 5,-1035.6104,-953.7844,128.5026))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1081.0226,-997.9811,128.5026,-1089.9166,-962.7728,128.5025,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1081.0226,-997.9811,128.5026))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1089.9166,-962.7728,128.5025,-1123.8011,-964.7301,128.5021,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1089.9166,-962.7728,128.5025))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1123.8011,-964.7301,128.5021,-1156.1207,-932.0033,128.5025,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1123.8011,-964.7301,128.5021))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1156.1207,-932.0033,128.5025,-1210.1948,-1017.1234,127.5494,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1156.1207,-932.0033,128.5025))
	{
		SetPlayerRaceCheckpoint(playerid,0,-1210.1948,-1017.1234,127.5494,-1145.9674,-1034.9795,128.5025,5);
	}
    if(IsPlayerInRangeOfPoint(playerid, 5,-1210.1948,-1017.1234,127.5494))
	{
		SetPlayerRaceCheckpoint(playerid,1,-1145.9674,-1034.9795,128.5025,-1145.9674,-1034.9795,128.5025,5);
	}
	if(IsPlayerInRangeOfPoint(playerid, 5,-1145.9674,-1034.9795,128.5025))
	{
		GivePlayerMoney(playerid,75);
	}
	return 1;
}
You help may be appreciated
Reply
#2

Hmm, by looking at your code, I don't see why it doesn't give the money but it does not remove the CP because you need to add this:
DisablePlayerRaceCheckpoint(playerid);
with GivePlayerMoney(playerid,75);
Reply
#3

PHP код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid5, -1145.5658,-1045.6901,128.5027))
    {
        
SetPlayerRaceCheckpoint(playerid0, -1183.2870,-1002.4471,128.5025, -1172.3785,-988.5954,128.50255);
    }
    if(
IsPlayerInRangeOfPoint(playerid5, -1183.2870,-1002.4471,128.5025))
    {
        
SetPlayerRaceCheckpoint(playerid0, -1172.3785,-988.5954,128.5025, -1129.6694,-1018.2800,128.50255);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1172.3785,-988.5954,128.5025))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1129.6694,-1018.2800,128.5025,-1098.4072,-1057.1410,128.4954,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1129.6694,-1018.2800,128.5025))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1098.4072,-1057.1410,128.4954,-1045.0264,-1022.5968,128.4956,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1098.4072,-1057.1410,128.4954))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1045.0264,-1022.5968,128.4956,-1011.6423,-980.4113,128.5025,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1045.0264,-1022.5968,128.4956))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1011.6423,-980.4113,128.5025,-1035.6104,-953.7844,128.5026,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1011.6423,-980.4113,128.5025))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1035.6104,-953.7844,128.5026,-1081.0226,-997.9811,128.5026,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1035.6104,-953.7844,128.5026))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1081.0226,-997.9811,128.5026,-1089.9166,-962.7728,128.5025,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1081.0226,-997.9811,128.5026))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1089.9166,-962.7728,128.5025,-1123.8011,-964.7301,128.5021,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1089.9166,-962.7728,128.5025))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1123.8011,-964.7301,128.5021,-1156.1207,-932.0033,128.5025,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1123.8011,-964.7301,128.5021))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1156.1207,-932.0033,128.5025,-1210.1948,-1017.1234,127.5494,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1156.1207,-932.0033,128.5025))
    {
        
SetPlayerRaceCheckpoint(playerid,0,-1210.1948,-1017.1234,127.5494,-1145.9674,-1034.9795,128.5025,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1210.1948,-1017.1234,127.5494))
    {
        
SetPlayerRaceCheckpoint(playerid,1,-1145.9674,-1034.9795,128.5025,-1145.9674,-1034.9795,128.5025,5);
    }
    if(
IsPlayerInRangeOfPoint(playerid5,-1145.9674,-1034.9795,128.5025))
    {
        
DisablePlayerRaceCheckpoint(playerid);
        
GivePlayerMoney(playerid,75);
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)