Raised This Month: $ Target: $400
 0% 

Get user authid problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
appz
New Member
Join Date: Aug 2011
Old 12-30-2011 , 11:18   Get user authid problem
Reply With Quote #1

Hello, I've got a big problem with get user authid.

I have wrote these lines:
PHP Code:
public client_disconnect(id) {
   new 
authid[34]
   
get_user_authid(id,authid,34)
   
log_amx("*** Player %s left server, SteamID %i ***"cnameauthid)

When player left server, in log I have:

Code:
L 12/30/2011 - 18:10:20: [myplugin.amxx] *** Player appz left server, SteamID 83 ***
What can I do to fix this ?

Last edited by appz; 12-30-2011 at 11:24.
appz is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-30-2011 , 11:22   Re: Get user authid problem
Reply With Quote #2

SteamID lenght is 35.

Code:
new authid[34] get_user_authid(id,authid,34) log_amx("*** Player %s left server, SteamID %i ***", cname, authid)


->

Code:
new authid[35] get_user_authid(id,authid,charsmax(authid)) log_amx("*** Player %s left server, SteamID %s ***", cname, authid)
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 12-30-2011 at 11:23.
Devil259 is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-30-2011 , 11:22   Re: Get user authid problem
Reply With Quote #3

%i is for integer values.
Use %s for string values.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
appz
New Member
Join Date: Aug 2011
Old 12-30-2011 , 11:27   Re: Get user authid problem
Reply With Quote #4

Now it's working!! Thank you a lot !!

Now I've had another question, how cand I write logs to a specific file ? ( ex: cstrike/addons/amxmodx/logs/myplugin_log.txt )
__________________
[IMG]http://img143.**************/img143/4185/24338ou1.png[/IMG]

Last edited by appz; 12-30-2011 at 11:28.
appz is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-30-2011 , 11:36   Re: Get user authid problem
Reply With Quote #5

log_to_file()
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
appz
New Member
Join Date: Aug 2011
Old 12-30-2011 , 11:39   Re: Get user authid problem
Reply With Quote #6

Thx
__________________
[IMG]http://img143.**************/img143/4185/24338ou1.png[/IMG]

Last edited by appz; 12-30-2011 at 12:06. Reason: .
appz is offline
Reply



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 14:31.


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