28.08.2010, 16:19
Hi!
can you help me? ... those who know ...
so:
To OnGameModeInit i put:
and I created
below i put
...Then compile hoping that if that object Will exceed that Area Will put back in the middle
but that object
but the object is always the same place and can not move it ... I try to move from place to other place but object don't move!
You tell me what's wrong and I fix the above?
Thank you very much
can you help me? ... those who know ...
so:
To OnGameModeInit i put:
Код:
SetTimer("BallOut",100,1); football=CreateObject(1598,1520.948,-1133.519,135.133,0.0,0.0,0.0);
Код:
forward BallOut(); public BallOut() { if(!IsObjectInArea(football,1562.119, 1501.274, -1109.439, -1156.812)) { DestroyObject(football); football=CreateObject(1598,1520.948,-1133.519,135.133,0.0,0.0,0.0); } return 1; }
Код:
stock IsObjectInArea(objectid, Float:minX, Float:maxX, Float:minY, Float:maxY) { new Float:x,Float:y,Float:z; GetObjectPos(objectid, x,y,z); if (x > minX && x < maxX && y > minY && y < maxY) return true; return false; }
but that object
but the object is always the same place and can not move it ... I try to move from place to other place but object don't move!
You tell me what's wrong and I fix the above?
Thank you very much