Page 1 of 1

read player.name?

Posted: Sun Jul 22, 2012 3:49 am
by langelot
hello
i've been searching on this forum to find a way to read the actual player.name and then if the player name is xxxxxxxxxx then load a "tag" in my WP file

i've tried

Code: Select all


<onload>
local name = player.name
if name == xxxx then
__WPL:setWaypointIndex(__WPL:findWaypointTag("middle"))
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("end"))
end
</onload>


but it didn't work, i also tried with

Code: Select all

if name == "xxxx" then
didn't work

:/

thanks in advance

Re: read player.name?

Posted: Sun Jul 22, 2012 4:15 am
by lisa
player.Name

Has to be exact, capitals and all

Re: read player.name?

Posted: Sun Jul 22, 2012 4:21 am
by langelot
ahhh i'm going to try it right the way, sorry to disturb you with such a rubbish question but i've been searching for hours :(

thanks anyway

Re: read player.name?

Posted: Sun Jul 22, 2012 5:23 am
by lisa
All good, if you open up rom/classes/pawn.lua

Anything that has self. can be player. and yeah it has to be exact