loading position + z 5
#1

How do you load position with a vehicle and then put +Z 5 ? Like, if you load your position and if your in a vehicle, you go 5 meter higher then normal
Reply
#2

here:

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	new Float:x,Float:y,Float:z;
	GetPlayerPos(playerid, x,y,z);
	if(vehicleid == 0)
	{
	SetPlayerPos(playerid, x,y,z+5);
	}
	return 1;
}
replace 0 with the vehicle id you want.
Reply
#3

pawn Код:
// The function where to store the players position:
new Float:eCoordinates[3];
GetPlayerPos(playerid, eCoordinates[0], eCoordinates[1], eCoordinates[2]);

// When loading the position
SetPlayerPos(playerid, eCoordinates[0], eCoordinates[1], eCoordinates[2] + 5); // + 5 meaning +5 to the z coord
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)