![]() |
|
t_express_system Serial - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193) +---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157) +----- Forum: General Support (https://lckb.dev/forum/forumdisplay.php?fid=203) +----- Thread: t_express_system Serial (/showthread.php?tid=4887) |
- FCV2005 - 04-05-2022 Hello, Someone can explain how is calculated a_serial ? On t_purchase is very simple ((lastInsertId * 10) + (AccountID % 10)); If im not wrong, i see here a CurrentTime ? ? 1648411105 0101 6460 1648570643 0102 7405 Thank you. - WhosUrDaddi - 04-05-2022 CurrentTime ServerNum ChannelNum SerialNumber (increases everytime by 1 till 9999 and then resets to 0000) 1648570643 01 02 7405 std: tring GetSerial(){ static int serial = 0; int nowtime = (int)time(0); std: tring str = boost: tr(boost::format("%d%02d%02d%04d") % nowtime % gserver->m_serverno % gserver->m_subno % serial);++serial; if (serial > 9999) { serial = 0; } return str; } - FCV2005 - 04-06-2022 Thank you very much |