From the Scripting Manual
procedure KillObject(ObjID: integer): integer;
Parameter Info:
ObjID (Integer): ID of the object to be destroyed (Created with SpawnObject)
Description:
This function will delete an object created with the SpawnObject function
Examples
var
i: integer;
begin
i := SpawnObject(GetPlayerStat(1,'x'),GetPlayerStat(1,'y'),5);
sleep(5000); // better don't use sleep because it will stop your server for 5 secs
KillObject(i);
// This will spawn a Spas 12 above player 1, wait 5 seconds and destroy it if it exists.
end;
External Links