players names :Di know you've all been looking

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

players names :Di know you've all been looking

Post by nuggets »

i'm not 100% certain about this but closer than most people have been
after using a trigger if you put

Code: Select all

name:
	for (local.i=1,local.i<=$player.size;local.i++)
		{
		$player[local.i].name = getcvar "ui_name"
		}
	iprintln_noloc parm.other.name " pessed the trigger"
you'll see the name of the player using the trigger :D (i hope, though i can't test for MP)

about shooting people i'm still looking
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I think that will only read the cvar on the server .
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yeah I think so too :(
Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

But can we tranfer this to a variable, like:

name:
? ?for (local.i=1,local.i<=$player.size;local.i++)
? ?? ?{
? ?? ?$player[local.i].name = getcvar "ui_name"
local.name=$player[local.i].name // <---
? ?? ?}
? ?iprintln_noloc local.name " pessed the trigger"

:?:
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes you could do that ;) but 'getcvar' will still read the server cvar, not the client one :(
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

damn it, it was worth a try ( :) and :( )
hope this helps, prob not cos it's all foreign 2 me :-/
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

:cry:....I heard that you can get a name is BT...
Image
Post Reply