23.08.2018, 03:59
Hello guys, I have this code, but it does not work for me, could someone tell me how to detect a wall with an npc?
I do not use "mapandreas" and I have tried "colandreas" and it does not work...
I do not use "mapandreas" and I have tried "colandreas" and it does not work...
PHP код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}