Raised This Month: $51 Target: $400
 12% 

GetClientAuthString()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Yoav
Junior Member
Join Date: May 2010
Old 05-14-2010 , 01:06   GetClientAuthString()
Reply With Quote #1

Hello, im new to SourcePawn.
Im similliar to pawn from GTA SA:MP so im not totally newb ;P
Anyway, this piece of code:
PHP Code:
 public OnClientConnected(client)
{
 new 
String:pName[256],String:sid[256];
 
GetClientName(client,pName,sizeof(pName));
 
GetClientAuthString(client,sid,sizeof(sid));
 
PrintToServer("%s[%s] connected!",pName,sid);

prints this:
-=Yoav=-[] connected!
instead of printing something like this:
-=Yoav=-[0:0:0] connected!
Any help? :O

Last edited by Yoav; 05-14-2010 at 01:10.
Yoav is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 05-14-2010 , 01:15   Re: GetClientAuthString()
Reply With Quote #2

OnClientConnected might be too early. OnClientAuthorized is called when a client receives a steamid.

Code:
public OnClientAuthorized(client, const String:auth[])
{
     PrintToChatAll("%N [%s] connected!", client, auth);
}
__________________
pheadxdll is offline
Yoav
Junior Member
Join Date: May 2010
Old 05-14-2010 , 08:04   Re: GetClientAuthString()
Reply With Quote #3

It says my steam id is:
STEAM_0:0:0
and i know it isn't o.O
And i keep getting this error:
Cannot verify load for invalid steam ID [I:0:0]
+ i cant make my server public
Yoav is offline
voogru
Inspector Javert
Join Date: Oct 2004
Old 05-14-2010 , 08:20   Re: GetClientAuthString()
Reply With Quote #4

You're not applying any nosteam cracks are you?
voogru is offline
Yoav
Junior Member
Join Date: May 2010
Old 05-14-2010 , 09:12   Re: GetClientAuthString()
Reply With Quote #5

Not really
You can add me if you want to...
Yoav 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 05:29.


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