DestroyActor

From SA-MP Wiki

Jump to: navigation, search

DestroyActor was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Description:

Destroy an actor which was created with CreateActor.


Parameters:
(actorid)
actoridThe ID of the actor to destroy. Returned by CreateActor.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The actor with the ID specified does not exist.


new MyActor;
 
public OnFilterScriptInit()
{
    MyActor = CreateActor(...);
    return 1;
}
 
public OnFilterScriptExit()
{
    DestroyActor(MyActor);
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages