Greetings AlliedModders.
I was looking for some codes that support's steam player's.
But the problem is i founded several codes. And I don't really know which of them works correctly or it's coded good.
I tested some of them, they worked as I thought.
If someone explain witch code can be used and why, i would be really happy.
Codes:
PHP Code:
stock bool:is_user_steam(id)
{
new auth[65]
get_user_authid(id,auth,64)
if(contain(auth, "STEAM_0:0:") != -1 || contain(auth, "STEAM_0:1:") != -1)
return true;
return false;
}
PHP Code:
stock bool:is_user_steam(id)
{
static dp_pointer
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", id)
server_exec()
return (get_pcvar_num(dp_pointer) == 2) ? true : false
}
return false
}
PHP Code:
stock bool:is_steam(auth[])
{
if(contain(auth, "STEAM_0:0:") != -1 || contain(auth, "STEAM_0:1:") != -1)
return true;
return false;
}
PHP Code:
stock bool:is_user_steam(id)
{
new authid[32];
get_user_authid(id, authid, 31);
return containi(authid , ":") != -1 ? true : false;
}
PHP Code:
stock bool:is_steam(auth[])
{
return bool:(contain(auth, "STEAM_0:0:") != -1 || contain(auth, "STEAM_0:1:") != -1);
}
PHP Code:
stock bool:is_user_steam(id)
{
if(!is_user_connected(id) || is_user_bot(id) || is_user_hltv(id))
{
return -1;
}
new pos;
new authid[64];
get_user_authid(id,authid,63)
if((pos = containi(authid,"VALVE_")) != -1 || (pos = containi(authid,"ID_LAN")) != -1 || (pos = containi(authid,"ID_PENDING")) != -1 || equal(authid,"STEAM_666:88:666") || (pos = containi(authid,"HLTV")) != -1 )
{
return false;
}
new ip[64]
get_user_ip(id,ip,63,1)
if((pos = containi(authid,ip)) != -1 )
{
return false;
}
return true;
}
__________________