Moving object
#2

Sorry for what looks like bad indentation but basically, this is how to do it.
Meh actually its not that bad.

pawn Код:
new object;
public OnGameModeInit()
{
  SetTimer("ObjectCheck", 500, true);
  object = CreateObject(3092, -1118.052368, -978.442566, 129.008102, 0.0000, 0.0000, 282.8144);
}

forward ObjectCheck();
public ObjectCheck()
{
  new Float:x, Float:y, Float:z;
    GetObjectPos(object, x, y, z);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerInRangeOfPoint(i, 5, x, y, z))
      {
        new Float:a, Float:b, Float:c;
        GetPlayerPos(i, a, b, c);
        MoveObject(object, a, b, c, 2.0);

      }
    }
}
Reply


Messages In This Thread
Moving object - by Onyx09 - 31.03.2010, 07:20
Re: Moving object - by V1ceC1ty - 31.03.2010, 07:40
Re: Moving object - by Onyx09 - 31.03.2010, 08:24

Forum Jump:


Users browsing this thread: 1 Guest(s)