OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: RedHouse on 22 May 2005, 20:19:34

Title: Getting the profile name of the player
Post by: RedHouse 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
Title: Re:Getting the profile name of the player
Post by: dmakatra on 22 May 2005, 20:33:21
hint format ["%1", (name player)]

:beat: *Gets Shot* :beat:
Title: Re:Getting the profile name of the player
Post by: RedHouse on 22 May 2005, 21:06:59
hey cheers i knew it was somein simple like tht
Title: Re:Getting the profile name of the player
Post by: General Barron 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.
Title: Re:Getting the profile name of the player
Post by: RedHouse 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]