Quote:
Originally Posted by kramesa
Hi!
How i get this the steamID and the name of client_disconnect for serverprint?
Look my plugin fails
PHP Code:
#include <amxmodx> #include <amxmisc>
public plugin_init() { register_plugin("Client Test", "1.0", "krm") }
public client_disconnect(id) { new SteamID[32], Name[32] get_user_authid(id, SteamID, 31) get_user_name(id, Name, 31) set_task(5.0, "ServerPrint", id) }
public ServerPrint(SteamID[], Name[]) { server_print("SteamID: %s", SteamID) server_print("Name: %s", Name) }
|
PHP Code:
#include < amxmodx >
public client_disconnect( id )
{
new steam[ 35 ], name[ 32 ]
get_user_authid( id, steam, sizeof steam - 1 )
get_user_name( id, name, sizeof name - 1)
sprint( steam, name )
}
public sprint( steam[], name[] )
{
server_print("SteamID: %s", steam)
server_print("Name: %s", name)
}
your code calls ServerPrint with the paramater id with no "SteamID" or "Name".