25.08.2010, 08:59
Quote:
|
when you create an object at 0.0 0.0 0.0
then you move the object (shoot at it so the football moves; or whatever other way) and then do GetObjectPos it will still return 0.0 0.0 0.0 |
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & 1) // The fire button
{
new Float:X, Float:Y, Float:Z, Float:X3, Float:Y3;
GetObjectPos(Football, X, Y, Z);
GetXYInFrontOfPlayer(playerid, X3, Y3, 10.0);
if(PlayerToPoint(5.0, playerid, X, Y, Z))
{
MoveObject(Football, X3, Y3, Z, 15);
}
}
return 1;
}

