Add some more improvements to namesteal
This commit is contained in:
parent
16cd633b9c
commit
01ef882870
@ -27,11 +27,13 @@
|
|||||||
<Option name="Active" value="2"/>
|
<Option name="Active" value="2"/>
|
||||||
</Select>
|
</Select>
|
||||||
</LabeledObject>
|
</LabeledObject>
|
||||||
<AutoVariable width="fill" target="name.namesteal.reconnect" label="Namesteal Reconnect"/>
|
<AutoVariable width="fill" target="name.namesteal.reconnect" label="Namesteal reconnect"/>
|
||||||
|
<AutoVariable width="fill" target="name.namesteal.use-newlines" label="Namesteal newlines" tooltip="Use glitchy newlines, will make your name invisible."/>
|
||||||
|
<AutoVariable width="fill" target="name.namesteal.steamid-zero" label="Invisible avatar" tooltip="Use a steamid of 0, will make your avatar invisible."/>
|
||||||
<AutoVariable width="fill" target="misc.random-name" label="Random name"/>
|
<AutoVariable width="fill" target="misc.random-name" label="Random name"/>
|
||||||
</List>
|
</List>
|
||||||
</Box>
|
</Box>
|
||||||
<Box height="content" width="content" padding="12 6 6 6" name="Extra" x="215" y="75">
|
<Box height="content" width="content" padding="12 6 6 6" name="Extra" x="215" y="115">
|
||||||
<List width="200">
|
<List width="200">
|
||||||
<AutoVariable width="fill" target="noisemaker-spam.enable" label="Noisemaker spam"/>
|
<AutoVariable width="fill" target="noisemaker-spam.enable" label="Noisemaker spam"/>
|
||||||
<AutoVariable width="fill" target="player-tools.betrayal-limit" label="Betrayal limit"/>
|
<AutoVariable width="fill" target="player-tools.betrayal-limit" label="Betrayal limit"/>
|
||||||
|
@ -13,6 +13,8 @@ settings::String force_name{ "name.custom", "" };
|
|||||||
std::string name_forced = "";
|
std::string name_forced = "";
|
||||||
static settings::Int namesteal{ "name.namesteal", "0" };
|
static settings::Int namesteal{ "name.namesteal", "0" };
|
||||||
static settings::Boolean namesteal_reconnect("name.namesteal.reconnect", "true");
|
static settings::Boolean namesteal_reconnect("name.namesteal.reconnect", "true");
|
||||||
|
static settings::Boolean glitchy_newlines("name.namesteal.use-newlines", "false");
|
||||||
|
static settings::Boolean use_steamidzero("name.namesteal.steamid-zero", "false");
|
||||||
|
|
||||||
static std::string stolen_name;
|
static std::string stolen_name;
|
||||||
static unsigned stolen_target;
|
static unsigned stolen_target;
|
||||||
@ -53,7 +55,7 @@ bool StolenName()
|
|||||||
if (!player_tools::shouldTargetSteamId(info.friendsID))
|
if (!player_tools::shouldTargetSteamId(info.friendsID))
|
||||||
continue;
|
continue;
|
||||||
// Invisible character won't fit into name with max. length
|
// Invisible character won't fit into name with max. length
|
||||||
if (std::strlen(info.name) >= 31)
|
if (std::strlen(info.name) >= 29)
|
||||||
continue;
|
continue;
|
||||||
// Ignore Friendly
|
// Ignore Friendly
|
||||||
if (!player_tools::shouldTargetSteamId(info.friendsID))
|
if (!player_tools::shouldTargetSteamId(info.friendsID))
|
||||||
@ -93,7 +95,7 @@ bool StolenName()
|
|||||||
// If our name is the same as current, than change it and return true
|
// If our name is the same as current, than change it and return true
|
||||||
stolen_name = std::string(info.name);
|
stolen_name = std::string(info.name);
|
||||||
stolen_target = info.friendsID;
|
stolen_target = info.friendsID;
|
||||||
hacks::tf2::steamidstealer::SetSteamID(hacks::tf2::steamidstealer::IDStorage(stolen_target, "namestealer"));
|
hacks::tf2::steamidstealer::SetSteamID(hacks::tf2::steamidstealer::IDStorage(use_steamidzero ? 0 : stolen_target, "namestealer"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,10 +129,10 @@ std::string GetNamestealName(CSteamID steam_id)
|
|||||||
|
|
||||||
if (stolen_name != "")
|
if (stolen_name != "")
|
||||||
// Return the name that has changed from the func above
|
// Return the name that has changed from the func above
|
||||||
return format(stolen_name, "\e");
|
return format(stolen_name, glitchy_newlines ? "\n\n\n" : "\u2063");
|
||||||
}
|
}
|
||||||
else if (stolen_name != "")
|
else if (stolen_name != "")
|
||||||
return format(stolen_name, "\e");
|
return format(stolen_name, glitchy_newlines ? "\n\n\n" : "\u2063");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_IPC
|
#if ENABLE_IPC
|
||||||
|
Reference in New Issue
Block a user