[SA-MP Server 0.3a RC7] PVar resetted too early at server restart
#1

I found an SA-MP bug. The PVars are resetted before OnPlayerDisconnect is called, when you restart the server. If you leave the server it works.

Take a look at this:

Код:
[17:52:50] [chat] [Wanted]: I am now restarting...
[17:52:52] RCON (In-Game): Player [Wanted] sent command: gmx
[17:52:52] MyVar: 0
[17:53:04] Number of vehicle models: 0
[17:53:13] [chat] [Wanted]: And now i am leaving the server.
[17:53:17] MyVar: 5
[17:53:17] [part] Wanted has left the server (2:1)
You see that the PVar: "MyVar" is resetted to zero if i restart the server, but not if i am leaving the server.

The code that i used is:

Код:
public OnPlayerConnect(playerid)
{
	SetPVarInt(playerid, "MyVar", 5);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	printf("MyVar: %d", GetPVarInt(playerid, "MyVar"));
	return 1;
}
Because of this bug, my stats are not saved, because the PVar which is checking if i'm logged in fails, because the PVar is resetted.

Sorry for my bad English.

Wanted.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)