The title say it all.
I tried to use if (GETPLAYERAUTHID(pl->edict()) == "insert_steam_id_here")) do stuff but seem to do nothing.
Created 1 year ago2021-03-11 18:36:46 UTC by The Mighty Goglu.
FStrEqand have the two as its parameters:
if ( FStrEq( GETPLAYERAUTHID( pl->edict() ), "my_steamid" ) )
"insert_steam_id_here"are pointers to characters, const char*. Two strings can contain the same text (insert_steam_id_here) but not have the same memory address (pointer value) because they're stored in different locations, and you want to compare the text content, not compare where the content is stored in memory. When you do == on two pointers, you compare memory locations. FStrEq (and C's strcmp and similar functions) compare the actual characters those pointers point to.