AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   print player SteamID (https://forums.alliedmods.net/showthread.php?t=87386)

DaniDin 03-10-2009 21:56

print player SteamID
 
hi
i want to do when player connect it will type
"Your SteamID is :STEAM_0:1:11115491"

YamiKaitou 03-10-2009 23:42

Re: print player SteamID
 
PHP Code:

public client_putinserver(id)
{
    new 
szAuthid[37];
    
get_user_authid(idszAuthid36);
    
client_print(idprint_chat"Your SteamID is %s"szAuthid);



anakin_cstrike 03-11-2009 07:04

Re: print player SteamID
 
It has been asked before.

DaniDin 03-11-2009 10:17

Re: print player SteamID
 
i dont found it
and YamiKaitou
it's not work :(

YamiKaitou 03-11-2009 10:18

Re: print player SteamID
 
Quote:

Originally Posted by DaniDin (Post 778458)
i dont found it
and YamiKaitou
it's not work :(

Um, yes it does. You will not see it as when putinserver is called, you can't see any chat messages. So, you will need to create a task that will delay the print

DaniDin 03-11-2009 10:21

Re: print player SteamID
 
that what i do :\
set_task(10.0, "client_putinserver", id, _,_, "b", 10)

fysiks 03-11-2009 10:23

Re: print player SteamID
 
client_putinserver is called by the game. You should create your own function with Yami's code then set the task inside of client_putinserver().

DaniDin 03-11-2009 10:33

Re: print player SteamID
 
work :D
10x

Spunky 03-11-2009 20:33

Re: print player SteamID
 
Code:
new szAuthid[37]

Way too large.

Code:
new szID[20]

STEAM_0:X:XXXXXXXX

18 characters, so 20 is more than futureproof.

Styles 03-12-2009 02:19

Re: print player SteamID
 
Quote:

Originally Posted by Spunky (Post 778775)
Code:
new szAuthid[37]

Way too large.

Code:
new szID[20]

STEAM_0:X:XXXXXXXX

18 characters, so 20 is more than futureproof.

Honestly, having extra cells doesn't hurt anything. Technically its worse but by such a small fraction Spunky. On top of that, the steamid range is always being increased soon enough nine digits will be popular then ten and so on, and with the rapid growth of Steam, I for see this happening faster and faster. So adding these extra cells will just prevent more kids from posting saying there plugin doesn't work since they obviously have no clue what there doing.


All times are GMT -4. The time now is 08:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.