View Full Version : Quick question

03-17-2001, 01:40 AM
How are you supposed to test if a player has a certain account name online? Offline it is impossible to do, since none of the information is available, and I would like to know, for a couple scripts I am writing

03-17-2001, 03:14 AM
try it on one of those old gserver's i guess, if they even support it

03-17-2001, 07:19 AM
if (strequals(#a,accountname)) {

#a is the string that holds the player's account name...if you want to check a player of a certain index, use #a(index). Just remember that account names are case sensitive ;)

03-17-2001, 07:59 AM
Even I knew that :]

03-17-2001, 08:09 AM
yea, but when your offline, you dont have an account name set to yourself

03-17-2001, 08:19 AM
actually, from past experience, I think it uses the one you have selected or used last when you go into offline mode as #a....cuz I've gotten that code to work offline for just my account before.

03-17-2001, 08:26 AM
*Hides from Kyle's scary bad language in his Sub-Title*

03-17-2001, 09:38 AM
Thanks Kyle, I thought it was something like that, but I wasn't sure. :D

03-17-2001, 09:53 AM
sure, you might test with #n instead of #a and set your nickname to the account name you want to be used just to make sure things work.

*was unaware that was a bad word*

03-17-2001, 10:01 AM
Here is another way I just thought of, and checked offline....there is a way to check to see if your account name works in an NPC offline:
Make an NPC, then put this script in it...

if (playertouchsme) {setstring #a, accountname;}

that way, you can set your accountname properly, then test it out offline. When you are sure it works, you can then delete the npc that set the accountname.