psuedo
Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
// Created by ******
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));
}
// ... somewhere
if ( (newkeys & KEY_FIRE) && (newkeys & KEY_SPRINT) && (newkeys & KEY_HANDBRAKE))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:pos[2];
GetXYInFrontOfPlayer(playerid, pos[0], pos[1], 2.0f);
if( IsPlayerInRangeOfPoint(issuerid, 2.0, pos[0], pos[1], z) {
ApplyAnimation(issuerid,"GYMNASIUM","gym_tread_falloff",1.0,0,0,0,0,0);
ApplyAnimation(playerid,"DODGE","Crush_Jump",4.0,0,1,1,1,0);
}
}
try to work on that idea, dont know if it will work