SA-MP Forums Archive
OnPlayerDisconnect is not executing on my gamemode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDisconnect is not executing on my gamemode (/showthread.php?tid=418789)



OnPlayerDisconnect is not executing on my gamemode - deb014 - 26.02.2013

Hi, my problem is as the title says "OnPlayerDisconnect is not executing on my gamemode".

Basically if in this callback I have the following code

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    print("OnPlayerDisconnect");
    return 1;
}
and in-game i enter and then exit.. I got this output

Quote:

[20:52:02] Number of vehicle models: 7
[20:52:25] Incoming connection: 127.0.0.1:51541
[20:52:25] [join] player has joined the server (0:127.0.0.1)
[20:53:12] [part] player has left the server (0:1)

as you can see, the OnPlayerDisconnect line does not appear, so my question is: what would be happening?

Thanks in advance.


Re: OnPlayerDisconnect is not executing on my gamemode - Noles2197 - 26.02.2013

Try this:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    printf("OnPlayerDisconnect);
    return 1;
}



Respuesta: Re: OnPlayerDisconnect is not executing on my gamemode - deb014 - 26.02.2013

Quote:
Originally Posted by Noles2197
Посмотреть сообщение
Try this:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    printf("OnPlayerDisconnect);
    return 1;
}
seriously? that code will give me an error at compilation time, in addition, the problem is not the function, is the callback. but thanks.

Edit: solved, reason: outdated plugins.