• Swapping Player´s Identity by Using player.GetAll()
    4 replies, posted
Greetings. Is it possible to swap the Identity/nickname of all living players by using player.GetAll() and if it´s possible how? If it´s not possible which options do I have? Thanks in Advance.
"swapping identity" = changing the nicknames of all living players. E.g.: Player1, Player2, Player3 and Player4 are alive. Now they swap their identities. The Consequence: Player1 is shown as Player4 etc. 2. I know what player.GetAll() does. My idea was that: [lua]for q, w in pairs(player.GetAll()) do     if w:Alive() and w:IsValid() then  (HERE COMES THE "SWAPPING-CODE") end  end[/lua]
You could detour or make wrappers for PLAYER:Name/Nick, PLAYER:Team, etc that take into account the player's proxied identity and return the appropriate values. As a milder example, DarkRP overwrites PLAYER:Name/Nick to return the player's RP name instead of their Steam name.
Sorry, you need to Log In to post a reply to this thread.