get_player_name(poker) [message #204109] |
Fri, 16 June 2006 06:27 |
|
sycar
Messages: 144 Registered: February 2006 Location: Reading, UK
Karma: 0
|
Recruit |
|
|
Hi guys,
im using a poke script, but i want to get the name of the person who 'poked' it. I've tried get_player_name(poker) but it only gets the ID not the name. Any ideas of what i can do?
Thanks buffymaniack
|
|
|
|
|
Re: get_player_name(poker) [message #204211 is a reply to message #204109] |
Fri, 16 June 2006 21:19 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
Get_Player_Name(poker) is the correct way to get their name, ive used it before and it works fine.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
|
|
|
|
|
|
Re: get_player_name(poker) [message #205017 is a reply to message #204109] |
Fri, 23 June 2006 00:40 |
dead6re
Messages: 602 Registered: September 2003
Karma: 0
|
Colonel |
|
|
char PName[255];
PName = Get_Player_Name(poker);
printf("Poked - Player Name: %s\n", PName);
That should get you the name.
Let all your wishes be granted except one, so you will still have something to strieve for.
|
|
|
Re: get_player_name(poker) [message #205037 is a reply to message #205017] |
Fri, 23 June 2006 05:10 |
=HT=T-Bird
Messages: 712 Registered: June 2005
Karma: 0
|
Colonel |
|
|
dead6re wrote on Fri, 23 June 2006 02:40 |
char PName[255];
PName = Get_Player_Name(poker);
printf("Poked - Player Name: %s\n", PName);
That should get you the name.
|
Although, player names longer than 255 characters will cause that snippet of code to fail miserably (think std::string).
HTT-Bird (IRC)
HTTBird (WOL)
Proud HazTeam Lieutenant.
BlackIntel Coder & Moderator.
If you have trouble running BIATCH on your FDS, have some questions about a BIATCH message or log entry, or think that BIATCH spit out a false positive, PLEASE contact the BlackIntel coding team and avoid wasting the time of others.
|
|
|
|
Re: get_player_name(poker) [message #205059 is a reply to message #204109] |
Fri, 23 June 2006 09:27 |
dead6re
Messages: 602 Registered: September 2003
Karma: 0
|
Colonel |
|
|
I used the variable PName so he could understand how to store the name, although I could have just used printf and not stored the name. Just helps with his learning.
Let all your wishes be granted except one, so you will still have something to strieve for.
|
|
|