[HELP] ReSpwan Objects - 
TraNe15 -  20.09.2009
Hi everyone.. in my server there are lots of explosive barrels and when someone explode them they never respawn.. How can i respawn them after they explode..
Re: [HELP] ReSpwan Objects - 
[NYRP]Mike. -  20.09.2009
Use a command again, to respawn the Barrels, but i think there are other ways.
EG
Код:
	if (strcmp("/bombs", cmdtext, true, 10) == 0)
	{
		CreateObject(id,x,y,z);
		return 1;
	}
 -Mike.
Re: [HELP] ReSpwan Objects - 
TraNe15 -  20.09.2009
i want to make it automaticly..
Re: [HELP] ReSpwan Objects - 
[NYRP]Mike. -  20.09.2009
Create a timer then.
pawn Код:
#include <a_samp>
forward BombTimer();
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Bomb Timer - NY-Gaming.com - [NYRP]Mike.");
    print("--------------------------------------\n");
    SetTimer("BombTimer", 500, 1); //Bomb System
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerRequestSpawn(playerid)
{
    return 1;
}
public OnPlayerSpawn(playerid)
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/manualbomb", cmdtext, true, 10) == 0)
    {
        // objects here if u dnt want to wait for the timer
        return 1;
    }
    return 0;
}
public BombTimer()
{
    //=============================================[PLACE BOMB OBJECTS HERE]=================================
    //=======================================================================================================
    return 1;
}
 
Paste that into a new Script and use it as a FS'
-Mike.
**P.S: Link to 
Pastebin
Re: [HELP] ReSpwan Objects - 
TraNe15 -  20.09.2009
Lol.. credits for this FS 

 but if objects dont explode it will create lots of object!!
Re: [HELP] ReSpwan Objects - 
[NYRP]Mike. -  20.09.2009
SOLUTION: Delete BombTimer from OnFilterScriptInit and place it under OnPlayerCommandText under ManualBombs, And wallah!
-Mike.
Re: [HELP] ReSpwan Objects - 
TraNe15 -  20.09.2009
Like This??
public Timer()
{
DestroyObject(346, x, y, z, bla bla..);
CreateObject(346, x, y, z, bla bla..);
return 1;
}
Re: [HELP] ReSpwan Objects - 
[NYRP]Mike. -  20.09.2009
Thanks ****** hang on, Count how many objects you have and in the timer do DestroyObject(1); etc and then add objects too.
Example:
pawn Код:
public BombTimer()
{
    //=============================================[PLACE BOMB OBJECTS HERE]=================================
    DestroyObject(1);
    CreateObject(id,x,y,z,x,y,z);
    //=======================================================================================================
    return 1;
}
 
-Mike.
Re: [HELP] ReSpwan Objects - 
[NYRP]Mike. -  20.09.2009
Or Create another Timer for DestroyBombs and add DestroyObjects so they dont overlap and Create alot of them.
-Mike.
**P.S: Sorry for Double post**
Re: [HELP] ReSpwan Objects - 
TraNe15 -  20.09.2009
Thank You [NYRP]Mike & Y_Leѕѕ