NPC:OnNPCDisconnect

From SA-MP Wiki

Jump to: navigation, search
NPC:OnNPCDisconnect was added in SA-MP 0.3a This NPC callback was added in SA-MP 0.3a and will not work in earlier versions!


Gets called when the NPC gets disconnected from the server.


Parameters:
(reason[])
reason[]The reason why the bot has disconnected from the server.


ReturnsThis function doesn't return a specific value


public OnNPCDisconnect(reason[])
{
    printf("Disconnected from the server. %s", reason);
}

Related Callbacks

The following callbacks might be useful as well, as they're related to this callback in one way or another.

  • NPC:OnNPCConnect: Gets called when the NPC successfully connects to the server.
Personal tools
In other languages