DisableObject
#2

In short: save the object ids, create a timer, destroy all saved ids in the timer function.

pawn Код:
//top of your script
new objectids[number_of_objects];


if (strcmp("/lol", cmdtext, true, 10) == 0)
    {

        objectids[0] = CreateObject(3666,-510.40856934,965.98443604,34.14291763,0.00000000,0.00000000,0.00000000);
        objectids[1] = CreateObject(3666,-510.93872070,964.32263184,36.46486664,0.00000000,0.00000000,0.00000000);
        // ...
        SetTimer("DeleteObjects", 30000, 0);


//Somewhere in your script:
forward DeleteObjects();
public DeleteObjects()
{
    for(new i = 0; i < sizeof(objectids); i ++) DestroyObject(objectids[i]);
}
Reply


Messages In This Thread
DisableObject - by Alex_Obando - 18.03.2011, 18:29
Re: DisableObject - by Mauzen - 18.03.2011, 18:50
Respuesta: DisableObject - by Alex_Obando - 18.03.2011, 18:58
Re: DisableObject - by maramizo - 18.03.2011, 19:01
Re: Respuesta: DisableObject - by Davz*|*Criss - 18.03.2011, 19:15
Respuesta: Re: Respuesta: DisableObject - by Alex_Obando - 18.03.2011, 19:25
Re: DisableObject - by Davz*|*Criss - 18.03.2011, 19:30
Respuesta: DisableObject - by Alex_Obando - 18.03.2011, 19:47
Respuesta: DisableObject - by Alex_Obando - 18.03.2011, 21:54
Re: DisableObject - by alpha500delta - 18.03.2011, 22:08

Forum Jump:


Users browsing this thread: 1 Guest(s)