save player data on crash
#8

ok then can you guys help me how to set a timer for it?
here is the saving part which is called on player disconnect.

Код:
SavePlayer(playerid)
{
	if(!PlayerLogged[playerid])
	return 0;
   	Money[playerid] = GetPlayerMoney(playerid);
   	skin[playerid] = GetPlayerSkin(playerid);
   	GetPlayerPos(playerid, X[playerid],Y[playerid],Z[playerid]);
   	GetPlayerFacingAngle(playerid, Ang[playerid]);

	CheckMySQL();

   	new string[256];
   	format(string, sizeof(string), "UPDATE Users SET Money='%d',skin='%d',X='%f',Y='%f',Z='%f',Angle='%f',dlic='%d' WHERE Name='%s'", Money[playerid], skin[playerid],X[playerid],Y[playerid],Z[playerid],Ang[playerid],dlic[playerid], Name[playerid]);
   	mysql_query(string);
   	return 1;
}
Reply


Messages In This Thread
save player data on crash - by THE_KNOWN - 22.01.2011, 08:27
Re: save player data on crash - by Macluawn - 22.01.2011, 08:29
Re: save player data on crash - by THE_KNOWN - 22.01.2011, 08:41
Re: save player data on crash - by Ash. - 22.01.2011, 08:42
Re: save player data on crash - by Alex_Valde - 22.01.2011, 08:46
Re: save player data on crash - by THE_KNOWN - 22.01.2011, 08:49
Re: save player data on crash - by sabretur - 22.01.2011, 08:51
Re: save player data on crash - by THE_KNOWN - 22.01.2011, 08:54
Re: save player data on crash - by Alex_Valde - 22.01.2011, 08:57
Re: save player data on crash - by THE_KNOWN - 22.01.2011, 08:58

Forum Jump:


Users browsing this thread: 3 Guest(s)