mirror of
https://github.com/diamante0018/MW3ServerFreezer.git
synced 2025-04-19 19:52:53 +00:00
To string
This commit is contained in:
parent
07070fc24c
commit
1dd227baa5
@ -27,19 +27,17 @@ namespace user_info
|
|||||||
|
|
||||||
const auto colorCode = rand() % 10;
|
const auto colorCode = rand() % 10;
|
||||||
|
|
||||||
char numbers[_MAX_U64TOSTR_BASE2_COUNT];
|
|
||||||
char name[16];
|
char name[16];
|
||||||
|
|
||||||
_itoa_s(rand() % 10000, numbers, sizeof(numbers), 10);
|
const auto& numbers = std::to_string(rand() % 10000);
|
||||||
_snprintf_s(name, sizeof(name), _TRUNCATE, "^%d%s", colorCode, numbers);
|
_snprintf_s(name, sizeof(name), _TRUNCATE, "^%d%s", colorCode, numbers.data());
|
||||||
|
|
||||||
info.set("name", name);
|
info.set("name", name);
|
||||||
|
|
||||||
info.set("ec_usingTag", "1");
|
info.set("ec_usingTag", "1");
|
||||||
info.set("ec_TagText", utils::string::va("^%dGG", colorCode));
|
info.set("ec_TagText", utils::string::va("^%dGG", colorCode));
|
||||||
|
|
||||||
char bigTitle[_MAX_U64TOSTR_BASE2_COUNT];
|
const auto& bigTitle = std::to_string(rand() % 512);
|
||||||
_itoa_s(rand() % 512, bigTitle, sizeof(bigTitle), 10);
|
|
||||||
info.set("ec_TitleBg", bigTitle);
|
info.set("ec_TitleBg", bigTitle);
|
||||||
|
|
||||||
game::CL_AddReliableCommand(_a1, utils::string::va("userinfo \"%s\"", info.build().data()));
|
game::CL_AddReliableCommand(_a1, utils::string::va("userinfo \"%s\"", info.build().data()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user