NPC:OnNPCDisconnect
From SA-MP Wiki
Description:
Gets called when the NPC gets disconnected from the server.
(reason[])
reason[] | The reason why the bot has disconnected from the server. |
Return Values:
This function does not return any specific values.
public OnNPCDisconnect(reason[]) { printf("Disconnected from the server. %s", reason); }
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnNPCConnect: Gets called when the NPC successfully connects to the server.
- OnPlayerDisconnect: Called when a player leaves the server.
- OnPlayerConnect: Called when a player connects to the server.