Raised This Month: $ Target: $400
 0% 

Steam id poster


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
usabrad86
Junior Member
Join Date: Jun 2009
Location: Florida
Old 06-26-2009 , 05:39   Steam id poster
Reply With Quote #1

i think im almost there, just can get the userid to print

the tested output is

PHP Code:
Player()  has Left the server
has joined the server didnt even show

output I wanted is
PHP Code:
[IDPlayer(STEAM_0:0:1234has Joined the server.
[
IDPlayer(STEAM_0:0:1234has Left the server
and the code i make/used
PHP Code:
#include <amxmodx>
#include <amxmisc>

stock header[] = "[ID]"

public client_connect(id) {
    new 
userid get_user_userid(id)
    new 
name[32]
    
get_user_info(id"name"name31)
    
client_print(0,print_chat,"%s %s(%s) has Joined the server."headernameuserid);
}

public 
client_disconnect(id) {
    new 
userid get_user_userid(id)
    new 
name[32]
    
get_user_info(id"name"name31
    
client_print(0,print_chat,"%s %s(%s) has Left the server."headernameuserid);

usabrad86 is offline
Send a message via AIM to usabrad86
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 06-26-2009 , 05:45   Re: Steam id poster
Reply With Quote #2

Code:
new userid = get_user_userid(id)

should be

Code:
new userid[] = get_user_userid(id)
__________________
DA is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-26-2009 , 05:50   Re: Steam id poster
Reply With Quote #3

PHP Code:
#include <amxmodx>
 
#define PREFIX "[ID]"
 
public plugin_init()
{
    
register_plugin("Connect Message""0.1""usabrad86");
}
 
public 
client_connect(id
{
    new 
name[32], authid[32];
    
get_user_name(idname31);
    
get_user_authid(idauthid31);
    
client_print(0print_chat"%s %s(%s) has Joined the server."PREFIXnameauthid);
}
 
public 
client_disconnect(id
{
    new 
name[32], authid[32];
    
get_user_name(idname31);
    
get_user_authid(idauthid31); 
    
client_print(0print_chat"%s %s(%s) has Left the server."PREFIXnameauthid);

__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-26-2009 , 18:46   Re: Steam id poster
Reply With Quote #4

Instead of Define or stock, use:

PHP Code:
new const header[] = "[ID]" 
__________________
fysiks is offline
usabrad86
Junior Member
Join Date: Jun 2009
Location: Florida
Old 06-29-2009 , 03:19   Re: Steam id poster
Reply With Quote #5

trying to make it print all when i type amx_steamids

PHP Code:
#include <amxmodx>
 
new const header[] = "[ID]" 
 
public plugin_init()
{
    
register_plugin("Connect Message""0.1""usabrad86");
    
register_concmd("amx_steamids","postnow",ADMIN_KICK,"Show all steam ids"
}
 
public 
client_connect(id
{
    new 
name[32], authid[32];
    
get_user_name(idname31);
    
get_user_authid(idauthid31);
    
client_print(0print_chat"%s %s(%s) has Joined the server."headernameauthid);
}
 
public 
client_disconnect(id
{
    new 
name[32], authid[32];
    
get_user_name(idname31);
    
get_user_authid(idauthid31); 
    
client_print(0print_chat"%s %s(%s) has Left the server."headernameauthid);


public 
postnow() 
{
    new 
name[32], authid[32];
    
get_user_name(idname31);
    
get_user_authid(idauthid31);
    
client_print(0print_chat"%s %s(%s)"headernameauthid);

usabrad86 is offline
Send a message via AIM to usabrad86
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-29-2009 , 03:34   Re: Steam id poster
Reply With Quote #6

If you want to show all the steamid at once using the command, you have to loog through all players.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:40.


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