Problem with objects :S
#1

I making INC file someting like "new pickup" problem is in this code

pawn Код:
stock CreateRing(Float:X,Float:Y,Float:Z)
{
     obj1 = CreateObject(3438,X,Y,Z+6,0.00000000,90.00000000,300);
     obj2 = CreateObject(3438,X,Y,Z-1,0.00000000,90.00000000,300);
     return true;
}
And i have one timer in INC

pawn Код:
forward MovingTimer();
public MovingTimer()
{
    new
    Float:X,
    Float:Y,
    Float:Z;
    foreach(Player, i)
    {
      if(Moving[i] == 0)
      {
        GetObjectPos(obj1 , X, Y, Z);
        MoveObject(obj1 , X, Y, Z-7,5);
        GetObjectPos(obj2, X, Y, Z);
        MoveObject(obj2, X, Y, Z+7,5);
        Moving[i] = 1;
      }
      else if(Moving[i] == 1)
      {
        GetObjectPos(obj1 , X, Y, Z);
        MoveObject(obj1 , X, Y, Z+7,5);
        GetObjectPos(obj2, X, Y, Z);
        MoveObject(obj2, X, Y, Z-7,5);
        Moving[i] = 0;
      }
    }
    return true;
}
And the problem is, when i create ring >

pawn Код:
CreateRing(2121.5203,1923.7277,10.6719);
evrything works fine BUT if i create more then one ring then just one ring changeing them position from timer, that's because of object id mess up :-/ so can someone help me how to fix it
Reply


Messages In This Thread
Problem with objects :S - by [H]265 - 03.11.2010, 19:33
Re: Problem with objects :S - by KaleOtter - 03.11.2010, 20:19
Re: Problem with objects :S - by [H]265 - 03.11.2010, 20:35
Re: Problem with objects :S - by [H]265 - 03.11.2010, 21:17
Re: Problem with objects :S - by Cameltoe - 03.11.2010, 21:23
Re: Problem with objects :S - by Hal - 03.11.2010, 21:23
Re: Problem with objects :S - by [H]265 - 03.11.2010, 21:27
Re: Problem with objects :S - by Cameltoe - 03.11.2010, 21:33
Re: Problem with objects :S - by [H]265 - 03.11.2010, 21:38
Re: Problem with objects :S - by [H]265 - 04.11.2010, 12:59
Re: Problem with objects :S - by gamer931215 - 04.11.2010, 15:26

Forum Jump:


Users browsing this thread: