Raised This Month: $ Target: $400
 0% 

help, GetClientAuthString


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maza51
Senior Member
Join Date: Mar 2010
Old 01-07-2011 , 06:03   help, GetClientAuthString
Reply With Quote #1

does not work?
Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

public OnPluginStart()
{
	HookEvent("round_start", Event_RoundStart);
}


public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	decl String:gAuth[21]
	GetClientAuthString( client, gAuth, sizeof( gAuth ) );
	if(!StrEqual(gAuth, "STEAM_0:0:00000", false))
	{
		PrintToChatAll("lol");
	}
}
maza51 is offline
SideX
Senior Member
Join Date: Jun 2010
Location: Ukraine, Melitopol.
Old 01-07-2011 , 06:59   Re: help, GetClientAuthString
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

public OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStart);
}


public 
Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
decl String:gAuth[21]
    
GetClientAuthStringclientgAuthsizeofgAuth ) );
    if(!
StrEqual(gAuth"0:0:00000"false))
    {
        
PrintToChatAll("lol");
    }

try this
SideX is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 01-07-2011 , 07:05   Re: help, GetClientAuthString
Reply With Quote #3

No, it's STEAM...
__________________
FaTony is offline
maza51
Senior Member
Join Date: Mar 2010
Old 01-07-2011 , 07:22   Re: help, GetClientAuthString
Reply With Quote #4

хм.. Работает. Спс
Только Одна вешь. "LoL" Пишется еще тогда, когда игрок приконектился..

PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

public OnPluginStart()
{
    
HookEvent("player_spawn"Event_Spawn);
}

public 
Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
decl String:gAuth[21]
    
GetClientAuthStringclientgAuthsizeofgAuth ) );
    if(!
StrEqual(gAuth"0:0:00000000"false))
    {
        
PrintToChat(client"LoL");
    }

maza51 is offline
SideX
Senior Member
Join Date: Jun 2010
Location: Ukraine, Melitopol.
Old 01-07-2011 , 07:42   Re: help, GetClientAuthString
Reply With Quote #5

Quote:
Originally Posted by maza51 View Post
хм.. Работает. Спс
Только Одна вешь. "LoL" Пишется еще тогда, когда игрок приконектился..
Попробуй проверять команду игрока. Если команда = команде спектаторов - тогда не проверяй стимид, иначе - проверяй.

Try check player's team. If it's equalto team spectators - dont check his steamid, else - check.
SideX is offline
maza51
Senior Member
Join Date: Mar 2010
Old 01-07-2011 , 09:03   Re: help, GetClientAuthString
Reply With Quote #6

Нет. Всетаки не работает это. Оказывается LoL пишется не только мне, а всем..
maza51 is offline
maza51
Senior Member
Join Date: Mar 2010
Old 01-07-2011 , 09:42   Re: help, GetClientAuthString
Reply With Quote #7

Мм.. Разобрался.
maza51 is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 01-07-2011 , 17:36   Re: help, GetClientAuthString
Reply With Quote #8

You're suppose to get the players Auth String when OnClientAuthorized and Sometimes they won't have a steam id by the time they spawn(at least the first time). The server checks if they have a steam id, if they don't the client gets kicked.
__________________
McFlurry is offline
Send a message via Skype™ to McFlurry
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 01:31.


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