Checkpoint answer please help.
#1

Hi, I'm new in pawno and scripting language, I want to create some checkpoints for DMV to have proper coordinates to work checkpointu must give / save when in the car or when you are not in it? Thank you for your help.
Reply
#2

Add one new
Код:
new CP[MAX_PLAYERS];
Under OnplayerConnect put
Код:
CP[playerid] = 0;
And make command to start a test
Код:
CMD:starttest(playerid, params[])
	{
	    if(IsPlayerInAnyVehicle(playerid))
		{
		    SendClientMessage(playerid, -1, "You have started driving test");
		    CP[playerid] = 1;
		    SetPlayerCheckpoint(playerid, X,Y,Z, checkpoint size);
		}
	}
And under public OnPlayerEnterCheckpoint put something like this
Код:
if(CP[playerid]==1)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
	    	DisablePlayerCheckpoint(playerid);
			CP[playerid] = 2;
			SetPlayerCheckpoint(playerid, Next X pos,Next Y pos,Next Z pos, your checkpoint size);
		}
	}
	if(CP[playerid]==2)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
	    	DisablePlayerCheckpoint(playerid);
			CP[playerid] = 3;
			SetPlayerCheckpoint(playerid, Next X pos,Next Y pos,Next Z pos, your checkpoint size);
		}
	}
And just add your coordinates and whatever you want.
Rep + if i helped you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)