Home   Help Search Login Register  

Author Topic: Getting the profile name of the player  (Read 859 times)

0 Members and 2 Guests are viewing this topic.

RedHouse

  • Guest
Getting the profile name of the player
« on: 22 May 2005, 20:19:34 »
I was wondering the best way to get the profile name of a player, i know its possible to get it cause they have with cti. If you do

Code: [Select]
hint format ["%1", players_unit]
you get, say the unit was me RedHouse, it would return something like "Alpha Black 1 (RedHouse)" which is messy.

How do you get it just to return RedHouse

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Getting the profile name of the player
« Reply #1 on: 22 May 2005, 20:33:21 »
hint format ["%1", (name player)]

:beat: *Gets Shot* :beat:

RedHouse

  • Guest
Re:Getting the profile name of the player
« Reply #2 on: 22 May 2005, 21:06:59 »
hey cheers i knew it was somein simple like tht

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Getting the profile name of the player
« Reply #3 on: 23 May 2005, 01:10:05 »
There isn't even any need to use the format command, since "name" returns a string. So just:

hint (name player)

Would work.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

RedHouse

  • Guest
Re:Getting the profile name of the player
« Reply #4 on: 23 May 2005, 18:01:00 »
I need to use it with things like "You just gave cash to RedHouse"

hint format["You just gave cash to %1", player]