09.08.2010, 01:24
For windows user
pawn Код:
//OnPlayerConnect
SetPVarInt(playerid, "CTime", GetTickCount());
pawn Код:
//OnPlayerDisconnect - save to file using dini
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
dini_SetInt("Time.txt", name, (
dini_GetInt("Time.txt", name) +
floatround( ( ( GetTickCount() - GetPVarInt(playerid, "CTime") ) / 1000.0 ), floatround_floor)
)
);