Hello,
I've been having a look around at trying to find out if there's a hook for when a player changes their in-game name in DarkRP, however can't seem to find anything around or if anything exists. How would I go about doing something like this, to check when the player changes their in-game name?
Thank you,
Pokinope
Hooks/Server/onPlayerChangedName
Accidentally accepted this answer, however this does not work for when people change name in DarkRP using /rpname
DarkRP/sv_data.lua at 2c60716999c1ce8a6356eea5f62990fe07f22812 ·..
DarkRP/sv_entityvars.lua at 05ab81edfb6e6e17e5621124f74115fb69c2..
DarkRP/sv_entityvars.lua at 05ab81edfb6e6e17e5621124f74115fb69c2..
According to the links above the hook should be called when /rpname is used
The function DarkRP.storeRPName calls the onPlayerChangedName hook.
The function setRPName in the player metatable calls storeRPName().
The function RPName() calls setRPName() and is registered as a chat command to the following aliases "rpname", "name", and "nick"
If the hook is not being called it may be due to an external (outside of DarkRP) script.
If its really not calling that hook, try Hooks/Shared/DarkRPVarChanged
Sorry, you need to Log In to post a reply to this thread.