08.06.2015, 12:51
Quote:
Teleports you back? Do you immediately set the player's position once the pickup has been picked up? If so you could try getting XY infront of the pickup (GetXYInfrontOfPlayer while making the pickup) And set the exit position to the position infront of the pickup.
Код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a); if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); } |