helix icon indicating copy to clipboard operation
helix copied to clipboard

Use SteamID instead of UniqueID in DoStaredAction and SetAction functions

Open OffLegAz opened this issue 2 years ago • 2 comments

According to the wiki, Player:UniqueID is deprecated and not guaranteed to be unique. So it's rellay necessary to use Player:SteamID or simmilar functions, like it's done in SetRagdolled function: https://github.com/NebulousCloud/helix/blob/2ee383b6779daee5e4f44deb7b1424a91e9c46f6/gamemode/core/meta/sh_player.lua#L560

OffLegAz avatar Jan 30 '22 12:01 OffLegAz

You do realize this function is also used for entities and if so entities don't have a steamid and it will return an error.

bloodycop7 avatar Jul 23 '23 03:07 bloodycop7

You do realize this function is also used for entities and if so entities don't have a steamid and it will return an error.

This is wrong because the method is only available in player metatable, so this change will never cause any errors for players and will avoid any collision issues.

FlorianLeChat avatar Jul 23 '23 10:07 FlorianLeChat