Glass Object Respawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Glass Object Respawn (
/showthread.php?tid=310895)
Glass Object Respawn -
lamarr007 - 14.01.2012
Hi, i have Glass DM mode in my server.
If anyone shoot this glass, glassґll destroy.
I want to create spawner of this glass objects (but i have 50 this object !).
Can you help me ?
Re: Glass Object Respawn -
mineralo - 14.01.2012
if make a timer and every 1min ( or how much time you want ) for destroy object and create new replace old
if you give more info about your object then I can show you how to do it
Re: Glass Object Respawn -
lamarr007 - 14.01.2012
I using streamer.
Re: Glass Object Respawn -
mineralo - 14.01.2012
I not used before the createdynamicobject but I think it's not diferent between usualy createobject
pawn Код:
new obj[9];
new check
public OnGameModeInit()
{
obj[0] = CreateDynamicObject();
obj[1] = CreateDynamicObject();
check = SetTimer("Objects",1000,1); // every 1 min
return 1;
}
public OnGameModeExit()
{
KillTimer(check);
return 1;
}
forward Objects();
public Objects();
{
DestroyObject(obj[0]);
DestroyObject(obj[1]);
obj[0] = CreateDynamicObject();
obj[1] = CreateDynamicObject();
return 1;
}
it should work
note: untested