26.03.2010, 07:43
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
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; }
// 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