Checkpoint Creation offset
#1

Hi,

I am creating a cargo area for the Andromada, which when you enter a checkpoint you will be teleported to the interior. The checkpoint is created based on the current Andromada location, so using Dynamic locations. I need to offset the checkpoint creation to be behind the Andromada, but somehow it fails every time. Here is a snippet of my script.

Код:
   
if(!strcmp(cmdtext, "/open-hatch", true))
      {
    	new currentveh;
        currentveh = GetPlayerVehicleID(playerid);
        new Float:vX, Float:vY, Float:vZ;
	GetVehiclePos(currentveh,vX,vY,vZ);
		
	if(GetVehicleModel(currentveh) == 592)
	{
		SetPlayerCheckpoint(playerid, vX, vY, vZ, 3.0);
		SendClientMessage(playerid, 0xFFFFFFFF, "Andromada's Cargo Hatch is now open !");
		return 1;
	}
	else
	{
		SendClientMessage(playerid, 0xFFFFFFFF, "You are not the Andromada's Pilot !");
		return 1;
	}
}

(identation is runined in these code tags :P)
I would like to maybe change the vX, or vY value, so that vY = vY - 4 (example so that the checkpoint appears behind the plane, and not directly underneath)

Thanks :P
Reply
#2

pawn Код:
SetPlayerCheckpoint(playerid, vX, vY-4.0, vZ, 3.0);

// Or

SetPlayerCheckpoint(playerid, vX-4.0, vY, vZ, 3.0);
Reply
#3

Thanks a lot. I was searching all over the place
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)