03.01.2012, 12:32
Clean script(shouldn't give you any error/warning,i hope):
try it,maybe it will work
pawn Код:
forward BallDown(playerid, Float:oldz);
public BallDown(playerid, Float:oldz)
{
new Float:x, Float:y, Float:z;
GetObjectPos(Ball, x, y, z);
new Float:a;
new Float:x2, Float:y2;
GetPlayerPos(playerid, x2, y2, z2); // its a hieght,not a facing angle :|
GetPlayerFacingAngle(playerid, a);
x2 += (16 * floatsin(-a, degrees));
y2 += (16 * floatcos(-a, degrees));
MoveObject(Ball, x2, y2, oldz-0.8, 10.0+random(3));
Baller = 999;
ShootingBall = 0;
BallBounce = 1;
return 1;
}
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
// new Float:a; you already used 1 like this,idk if it can couse in warnings but would be better if it will be changed
new Float:FA,Float:pz,Float:vz;
GetPlayerPos(playerid, x, y, pz); // its x,y,z not x,y,a
GetPlayerFacingAngle(playerid, FA);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), vz); //vehicle hieght not Facing Angle
}
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}
