08.06.2015, 12:24
Quote:
So it could be pickupid == DoorInfo[x][dPickup], it worked this way but there's a little problem, when you exit it teleports you back, is there any way to prevent such a thing? I was thinking to add something like +2 to a certain position but that may bug the player in certain places so I would like to avoid that.
|
Код:
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)); }