SA-MP Forums Archive
Objects respawn help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Objects respawn help (/showthread.php?tid=275684)



Objects respawn help - Tanush123 - 10.08.2011

Well is it possible to make a command like /robjects (respawn objects) where it gets destroy and created again without restarting server?


Re: Objects respawn help - =WoR=Varth - 10.08.2011

pawn Код:
new Float:Pos[6];
GetObjectPos(objectid,Pos[0],Pos[1],Pos[2]);
GetObjectPos(objectid,Pos[3],Pos[4],Pos[5]);
DestroyObject(objectid)
CreateObject(modelid,Pos[0],Pos[1],Pos[2],Pos[3],Pos[4],Pos[5],300);
AFAIK there's no GetObjectModel fucntion. So I guess you have to make your own with variable.