[HELP] Warnings
#5

Clean script(shouldn't give you any error/warning,i hope):
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));
}
try it,maybe it will work
Reply


Messages In This Thread
[HELP] Warnings - by V4at - 03.01.2012, 06:35
Re: [HELP] Warnings - by mineralo - 03.01.2012, 06:43
Re : [HELP] Warnings - by V4at - 03.01.2012, 07:05
Re: [HELP] Warnings - by mineralo - 03.01.2012, 10:10
Re: [HELP] Warnings - by Kaperstone - 03.01.2012, 12:32
Re : [HELP] Warnings - by V4at - 03.01.2012, 12:41
Re: Re : [HELP] Warnings - by Kaperstone - 03.01.2012, 12:46
Re : [HELP] Warnings - by V4at - 03.01.2012, 12:52

Forum Jump:


Users browsing this thread: 1 Guest(s)