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

If steam id = my steam id :D


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blodhblaka
Member
Join Date: Jan 2015
Old 03-08-2015 , 21:17   If steam id = my steam id :D
Reply With Quote #1

Hello (again)


You helped me a lot but I need your help again.

PHP Code:
    new color[4];
    if (
clients steam id my steamid STEAM:00blablabla// <<<< how do I get clients steam id .... 
{

    
color[0] = 0
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;
else
    
color[0] = 255;
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;


Thanks for answers

Last edited by blodhblaka; 03-08-2015 at 21:19.
blodhblaka is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 03-08-2015 , 21:35   Re: If steam id = my steam id :D
Reply With Quote #2

Old Syntax
https://sm.alliedmods.net/api/index....d=show&id=401&
https://sm.alliedmods.net/api/index....d=show&id=618&
PHP Code:
new color[4];
new 
String:auth[32];
GetClientAuthString(clientauthsizeof(auth));

if (
StrEqual(auth"STEAM:00blablabla"false))
{
    
color[0] = 0
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;
}
else
{  
    
color[0] = 255;
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;

+1.7
https://sm.alliedmods.net/new-api/cl...etClientAuthId
https://sm.alliedmods.net/new-api/string/StrEqual
PHP Code:
int color[4];
char auth[32];
GetClientAuthId(clientAuthId_Steam2authsizeof(auth), false);

if (
StrEqual(auth"STEAM:00blablabla"false))
{
    
color[0] = 0
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;
}
else
{  
    
color[0] = 255;
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;


Last edited by LambdaLambda; 03-08-2015 at 21:39.
LambdaLambda is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-09-2015 , 07:16   Re: If steam id = my steam id :D
Reply With Quote #3

Quote:
Originally Posted by LambdaLambda View Post
Old Syntax
https://sm.alliedmods.net/api/index....d=show&id=401&
https://sm.alliedmods.net/api/index....d=show&id=618&
PHP Code:
new color[4];
new 
String:auth[32];
GetClientAuthString(clientauthsizeof(auth));

if (
StrEqual(auth"STEAM:00blablabla"false))
{
    
color[0] = 0
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;
}
else
{  
    
color[0] = 255;
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;

+1.7
https://sm.alliedmods.net/new-api/cl...etClientAuthId
https://sm.alliedmods.net/new-api/string/StrEqual
PHP Code:
int color[4];
char auth[32];
GetClientAuthId(clientAuthId_Steam2authsizeof(auth), false);

if (
StrEqual(auth"STEAM:00blablabla"false))
{
    
color[0] = 0
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;
}
else
{  
    
color[0] = 255;
    
color[1] = 0;
    
color[2] = 255;
    
color[3] = 150;

GetClientAuthID exists in 1.6
__________________
WildCard65 is offline
sim242
AlliedModders Donor
Join Date: Dec 2012
Location: England
Old 03-09-2015 , 09:22   Re: If steam id = my steam id :D
Reply With Quote #4

I think he was referring to the new declaration. Just because there's a function that exists in 1.6 that doesn't mean it can't be used within code and the code still be done using the 1.7 syntax.
__________________
Steam - Sim
Request a private plugin
Not accepting requests at this time
sim242 is offline
Send a message via Skype™ to sim242
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 03-09-2015 , 11:27   Re: If steam id = my steam id :D
Reply With Quote #5

Quote:
Originally Posted by WildCard65 View Post
GetClientAuthID exists in 1.6
Good for you, but why you telling me this?
LambdaLambda is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 03-09-2015 , 12:07   Re: If steam id = my steam id :D
Reply With Quote #6

Quote:
Originally Posted by LambdaLambda View Post
Good for you, but why you telling me this?
Because you posted GetClientAuthString() in your 1.6 example. Both examples should be using GetClientAuthId().
__________________
ddhoward is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 03-09-2015 , 12:11   Re: If steam id = my steam id :D
Reply With Quote #7

I've never been using it, output is the same in that case, so they shouldn't be, but could be. GetClientAuthString() is quicker to type/remember (less parameters), it doesn't exist in 1.7, so I replaced it with GetClientAuthId().

Last edited by LambdaLambda; 03-09-2015 at 12:11.
LambdaLambda is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 03-09-2015 , 12:17   Re: If steam id = my steam id :D
Reply With Quote #8

IIRC, using GetClientAuthString should be throwing a deprecation warning whenever you try to compile using it. (People are still using 1.6?)

Also, you don't need to specify the last argument of GetClientAuthId();, it defaults to true, and you should NEVER pass 'false'.

PHP Code:
GetClientAuthId(clientAuthId_Steam2authsizeof(auth)); 
__________________

Last edited by ddhoward; 03-09-2015 at 12:18.
ddhoward is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 03-09-2015 , 12:32   Re: If steam id = my steam id :D
Reply With Quote #9

Quote:
Originally Posted by ddhoward View Post
IIRC, using GetClientAuthString should be throwing a deprecation warning whenever you try to compile using it. (People are still using 1.6?)
Why? I've never had any warnings because if that


Quote:
Originally Posted by ddhoward View Post
Also, you don't need to specify the last argument of GetClientAuthId();, it defaults to true, and you should NEVER pass 'false'.

PHP Code:
GetClientAuthId(clientAuthId_Steam2authsizeof(auth)); 
Yeah, that's true. i've been rushing to leave home really shortly, and wrote it without double chekcing. Sorry about that.
LambdaLambda is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-09-2015 , 13:50   Re: If steam id = my steam id :D
Reply With Quote #10

Quote:
Originally Posted by LambdaLambda View Post
I've never been using it, output is the same in that case, so they shouldn't be, but could be. GetClientAuthString() is quicker to type/remember (less parameters), it doesn't exist in 1.7, so I replaced it with GetClientAuthId().
Output is the same?

Not on TF2 it isn't. GetClientAuthString returns a SteamID3 on TF2 in 1.7 and newer.
__________________
Not currently working on SourceMod plugin development.
Powerlord 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 19:28.


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