22.09.2010, 08:28
Код:
public OnPlayerDisconnect(playerid, reason) { SavePlayer(playerid); return 1; }
Код:
stock SavePlayer(playerid) { if(GetPVarInt(playerid,"LoggedIn") == 1) { new name[24]; GetPlayerName(playerid,name,sizeof name); dUserSetINT(name).("Deaths",GetPVarInt(playerid,"Deaths")); dUserSetINT(name).("Kills",GetPVarInt(playerid,"Kills")); dUserSetINT(name).("Money",GetPVarInt(playerid,"Money")); dUserSetINT(name).("Color",GetPVarInt(playerid,"Color")); dUserSetINT(name).("Level",GetPVarInt(playerid,"Level")); new ip[16]; GetPVarString(playerid,"IP",ip,16); dUserSet(name).("IPAddress",ip); } }