跳到主要內容

DestroyActor

注意

此函式於 SA-MP 0.3.7 版本中新增,在更早的版本中無法使用!

Description​

Destroy an actor which was created with CreateActor.

NameDescription
actoridThe ID of the actor to destroy. Returned by CreateActor.

Returns​

true - The function executed successfully.

false - The function failed to execute. The actor with the ID specified does not exist.

Examples​

new MyActor;

public OnFilterScriptInit()
{
MyActor = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
return 1;
}

public OnFilterScriptExit()
{
DestroyActor(MyActor);
return 1;
}