[SOLVED] I fucking cannot understand where is the problem in the checkpoints
#1

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?
Reply
#2

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

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

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
Reply
#5

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?
Reply
#6

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
Reply
#7

I did, still i have the same problem
Reply
#8

Anyone?
Reply
#9

:///
Reply
#10

No one know what's the problem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)