SA-MP Forums Archive
[SOLVED] I fucking cannot understand where is the problem in the checkpoints - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] I fucking cannot understand where is the problem in the checkpoints (/showthread.php?tid=135799)



[SOLVED] I fucking cannot understand where is the problem in the checkpoints - Ben147 - 21.03.2010

I maded forward of license checkpoints
Код:
forward CheckForLicenseTestCheckpoint(playerid, tmpcar);
I added it to OnPlayerEnterCheckpoint

Код:
		new tmpcar = GetPlayerVehicleID(playerid);
		CheckForLicenseTestCheckpoint(playerid, tmpcar);
and after i maded the public of the CheckForLicenseTestCheckpoint like this:

Код:
public CheckForLicenseTestCheckpoint(playerid, tmpcar)
{
	tmpcar = GetPlayerVehicleID(playerid);
	if(DrivingCar(tmpcar) && PlayerToPoint(12.0, playerid,329.5655,-1536.8867,32.9324))
	{
		if (Test[playerid] == 3)
		{
			PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
			SetPlayerCheckpoint(playerid,343.8846,-1646.0770,32.7906,7.0);
		}
	}
	else if(DrivingCar(tmpcar) && PlayerToPoint(12.0, playerid,343.8846,-1646.0770,32.7906))
	{
		if (Test[playerid] == 3)
		{
			PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
			DisablePlayerCheckpoint(playerid);
			SetPlayerCheckpoint(playerid,809.3568,-1674.4735,13.1162,7.0);
		}
	}
	}
When i up on the checkpoint , the checkpoint disappear and a new checkpoint isn't creating can anyone help me?


Re: I fucking cannot understand where is the problem in the checkpoints - dice7 - 21.03.2010

You aren't setting the next checkpoint
https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint


Re: I fucking cannot understand where is the problem in the checkpoints - Ben147 - 21.03.2010

My wrong i gave wrong code check it now if you can help


Re: I fucking cannot understand where is the problem in the checkpoints - dice7 - 21.03.2010

The current code should set the next checkpoint. Debug your code to see, if it executes to the end.

Also, your function doesn't need to be public
https://sampwiki.blast.hk/wiki/Stock#public


Re: I fucking cannot understand where is the problem in the checkpoints - Ben147 - 21.03.2010

Quote:
Originally Posted by dice7
The current code should set the next checkpoint. Debug your code to see, if it executes to the end.

Also, your function doesn't need to be public
https://sampwiki.blast.hk/wiki/Stock#public
can you explain me more bit please?


Re: I fucking cannot understand where is the problem in the checkpoints - dice7 - 21.03.2010

nvm, after another look I found a fault. Remove the
pawn Код:
tmpcar = GetPlayerVehicleID(playerid);
from the function, because you already passed the correct vehicle id, when you called it


Re: I fucking cannot understand where is the problem in the checkpoints - Ben147 - 21.03.2010

I did, still i have the same problem


Re: I fucking cannot understand where is the problem in the checkpoints - Ben147 - 22.03.2010

Anyone?


Re: I fucking cannot understand where is the problem in the checkpoints - Ben147 - 22.03.2010

:///


Re: I fucking cannot understand where is the problem in the checkpoints - Ben147 - 22.03.2010

No one know what's the problem?