[HELP] ReSpwan Objects
#1

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..
Reply
#2

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.
Reply
#3

i want to make it automaticly..
Reply
#4

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
Reply
#5

Lol.. credits for this FS but if objects dont explode it will create lots of object!!
Reply
#6

SOLUTION: Delete BombTimer from OnFilterScriptInit and place it under OnPlayerCommandText under ManualBombs, And wallah!

-Mike.
Reply
#7

Like This??

public Timer()
{
DestroyObject(346, x, y, z, bla bla..);
CreateObject(346, x, y, z, bla bla..);
return 1;
}
Reply
#8

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.
Reply
#9

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**
Reply
#10

Thank You [NYRP]Mike & Y_Leѕѕ
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)