Difference between revisions of "KillObject"
(Created page with "===From the Scripting Manual=== ''procedure KillObject(ObjID: integer): integer;'' '''Parameter Info:''' ObjID (Integer): ID of the object to be destroyed (Created with ...") |
m (→Examples) |
||
Line 13: | Line 13: | ||
begin | begin | ||
i := SpawnObject(GetPlayerStat(1,'x'),GetPlayerStat(1,'y'),5); | i := SpawnObject(GetPlayerStat(1,'x'),GetPlayerStat(1,'y'),5); | ||
− | sleep(5000); | + | sleep(5000); // better don't use sleep because it will stop your server for 5 secs |
KillObject(i); | KillObject(i); | ||
// This will spawn a Spas 12 above player 1, wait 5 seconds and destroy it if it exists. | // This will spawn a Spas 12 above player 1, wait 5 seconds and destroy it if it exists. | ||
end; | end; | ||
</source> | </source> | ||
− | |||
==External Links== | ==External Links== |
Latest revision as of 11:30, 4 June 2014
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;