Automatically repair Glass Objects...
#6

Anyway, the problem is solved...
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.3110351747.70666518.0135300.0000000.000000, -7.599997300);
GlassObjsIds[1] = .....
GlassObjsIds[2] = .....
.......
......
...... 
Then on OnFilterScriptInit, I've created a timer that runs RepairGlassObjs after every 10 seconds
PHP код:
SetTimer("RepairGlassObjs",10000,true); 
And the RepairGlassObjs function is this,

PHP код:
public RepairGlassObjs(){
    new 
Float:X,Float:Y,Float:Z,Float:RX,Float:RY,Float:RZ;
    for (new 
i=0sizeof(GlassObjsIds); i++){
        
GetObjectPos(GlassObjsIds[i],X,Y,Z);
        
GetObjectRot(GlassObjsIds[i],RX,RY,RZ);
        
DestroyObject(GlassObjsIds[i]);
        
GlassObjsIds[i] = CreateObject(3851XYZRXRYRZ300);
    }

If anyone have the same problem, he can use this code...
Reply


Messages In This Thread
Automatically repair Glass Objects... - by jawadhyder15 - 21.03.2013, 17:26
Re: Automatically repair Glass Objects... - by Scenario - 21.03.2013, 17:26
Re: Automatically repair Glass Objects... - by TheDeadlyDutchi - 21.03.2013, 20:52
Re: Automatically repair Glass Objects... - by jawadhyder15 - 22.03.2013, 11:14
Re: Automatically repair Glass Objects... - by Dzines4SAMP - 22.03.2013, 11:47
Re: Automatically repair Glass Objects... - by jawadhyder15 - 22.03.2013, 12:05
Re: Automatically repair Glass Objects... - by Scenario - 22.03.2013, 12:44

Forum Jump:


Users browsing this thread: 1 Guest(s)