22.03.2013, 12:05
Anyway, the problem is solved...
I came up with this code:
Then on OnFilterScriptInit, I've created a timer that runs RepairGlassObjs after every 10 seconds
And the RepairGlassObjs function is this,
If anyone have the same problem, he can use this code...
I came up with this code:
PHP код:
new GlassObjsIds[20]; // I have 18 glass objects
// Objects are created like this
GlassObjsIds[0] = CreateObject(3851, -3023.311035, 1747.706665, 18.013530, 0.000000, 0.000000, -7.599997, 300);
GlassObjsIds[1] = .....
GlassObjsIds[2] = .....
.......
......
......
PHP код:
SetTimer("RepairGlassObjs",10000,true);
PHP код:
public RepairGlassObjs(){
new Float:X,Float:Y,Float:Z,Float:RX,Float:RY,Float:RZ;
for (new i=0; i < sizeof(GlassObjsIds); i++){
GetObjectPos(GlassObjsIds[i],X,Y,Z);
GetObjectRot(GlassObjsIds[i],RX,RY,RZ);
DestroyObject(GlassObjsIds[i]);
GlassObjsIds[i] = CreateObject(3851, X, Y, Z, RX, RY, RZ, 300);
}
}
![Smiley](images/smilies/smile.png)