17.08.2016, 09:56
The CreateObject should not be inside the loop otherwise you'll be creating a MAX_PLAYERS amount of objects (possibly a thousand if you didn't redefine MAX_PLAYERS) instead of just the one.
It is also rather silly that you use GetObjectPos right after creating the object. You already know its position because you just told the game to create the object at that position. So x, y and z are equal to ox, oy and oz respectively.
It is also rather silly that you use GetObjectPos right after creating the object. You already know its position because you just told the game to create the object at that position. So x, y and z are equal to ox, oy and oz respectively.