21.09.2011, 19:46
A possible solution would be to use GetXYBehindPlayer and store that location when they enter then teleport them there when they exit.
Another solution is to subtract like -5 from the exit coordinate like so. But that may lead to putting them in wall xD
SetPlayerPos(playerid,houseSETTINGS[inter][enter_pos][0]-5,houseSETTINGS[inter][enter_pos][1]-5,houseSETTINGS[inter][enter_pos][2]);
Another solution is to make them type /enter similar to grand larceny or press enter when they are on the pickup.
Another solution is to subtract like -5 from the exit coordinate like so. But that may lead to putting them in wall xD
SetPlayerPos(playerid,houseSETTINGS[inter][enter_pos][0]-5,houseSETTINGS[inter][enter_pos][1]-5,houseSETTINGS[inter][enter_pos][2]);
Another solution is to make them type /enter similar to grand larceny or press enter when they are on the pickup.
Код:
Float:GetXYBehindPlayer(playerid, &Float:q, &Float:w, Float:distance) { new Float:a; GetPlayerPos(playerid, q, w, a); if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) GetVehicleZAngle(GetPlayerVehicleID(playerid), a); else GetPlayerFacingAngle(playerid, a); q += (distance * -floatsin(-a, degrees)); w += (distance * -floatcos(-a, degrees)); return a; }