SHOW:
|
|
- or go back to the newest paste.
1 | /* | |
2 | - | native GetOffset(Float:x, Float:y, Float:, Float:angle, Float:offx, Float:offy, Float:offz, &Float:outx, &Float:outy, &Float:outz); |
2 | + | native GetCoordinateOffsets(Float:x, Float:y, Float:, Float:angle, Float:offx, Float:offy, Float:offz, &Float:outx, &Float:outy, &Float:outz); |
3 | ||
4 | - | native GetOffsets(Float:x, Float:y, Float:, Float:angle, Float:offx, Float:offy, Float:offz, &Float:outx, &Float:outy, &Float:outz); |
4 | + | x, y, z - The position of the source coordinates |
5 | angle - The angle from that coordinate (player/vehicle/object angle) | |
6 | - | native GetOffsetCoords(Float:x, Float:y, Float:, Float:angle, Float:offx, Float:offy, Float:offz, &Float:outx, &Float:outy, &Float:outz); |
6 | + | offx, offy, offz - The offsets in the X (left/right), y (forward/back) and z (up/down) directions. |
7 | outx, outy, outyz - The result coordinates at the offset. | |
8 | ||
9 | - | #define GetOffset GetOffsets |
9 | + | |
10 | - | #define GetOffset GetOffsets |
10 | + | |
11 | - | #define GetOffsetCoords GetOffsets |
11 | + | stock GetCoordinateOffsets(Float:x, Float:y, Float:z, Float:angle, Float:offx, Float:offy, Float:offz, &Float:outx, &Float:outy, &Float:outz) |
12 | - | stock GetOffsets(Float:x, Float:y, Float:z, Float:angle, Float:offx, Float:offy, Float:offz, &Float:outx, &Float:outy, &Float:outz) |
12 | + | |
13 | outx = x + (floatcos(angle, degrees) * offx) - (floatsin(angle, degrees) * offy); | |
14 | outy = y + (floatsin(angle, degrees) * offx) + (floatcos(angle, degrees) * offy); | |
15 | ||
16 | outz = z+offz; | |
17 | return 1; | |
18 | } |