new show_ip,show_steamid,show_time,show_ping,show_loss;
register_clcmd ("say /steamosok", "who_steam") //steamesek
register_clcmd ("say /sp", "who_steam") //steamesek
register_clcmd ("say /steamosjatekosok", "who_steam") //steamesek
show_ip = register_cvar("sp_showip","0")
show_steamid = register_cvar("sp_showsteamid","1")
show_time = register_cvar("sp_showtime","0")
show_ping = register_cvar("sp_showping","0")
show_loss = register_cvar("sp_showloss","0")
case 6: who_steam(id);
}
}
stock bool:is_user_steam(id)
{
new authid[32]
get_user_authid(id, authid, 31)
new hossz = strlen(authid)
if(!(equali(authid, "STEAM_ID_PENDING") ||
equali(authid, "STEAM_ID_LAN") ||
equali(authid, "HLTV") ||
equali(authid, "4294967295") ||
equali(authid, "VALVE_ID_LAN") ||
equali(authid, "VALVE_ID_PENDING")) && hossz <= 18)
{
return true
}
else
{
return false
}
return false
}
public who_steam(id)
{
new bool:ip_showed = false
new bool:steamid_showed = false
new bool:time_showed = false
new bool:ping_showed = false
new bool:loss_showed = false
if (get_pcvar_num(show_ip)>0)
{
ip_showed = true
}
if (get_pcvar_num(show_steamid)>0)
{
steamid_showed = true
}
if (get_pcvar_num(show_time)>0)
{
time_showed = true
}
if (get_pcvar_num(show_ping)>0)
{
ping_showed = true
}
if (get_pcvar_num(show_loss)>0)
{
loss_showed = true
}
new players[32], playersFound
get_players(players,playersFound)
new pos, message[2048]
new name[40], ip[30],steamid[32], ping, loss;
new str_pt[6],str_pi[6],str_lo[6]
pos += format(message[pos],2048 - pos,"<STYLE>body{background:#232323;color:#cfcbc2;margin:20px}table{width:100%%;line-height:160%%;font-size:12px}th{background:#2f3030;color:#c4b550;text-align:left}.q{border:2px solid #4a4945}tr{background:#4a4945}.b{background:#3b3b37}</STYLE>")
for (new i = 0;i < playersFound;i++)
{
new bool:steam = false
if (is_user_steam(id))
steam = true
new bool:bot = false
if (is_user_bot(id))
bot = true
get_user_name(players[i],name,39)
get_user_ip(players[i],ip,29,1)
get_user_authid(players[i], steamid, 31)
num_to_str(get_user_time(players[i]),str_pt,5)
get_user_ping(players[i],ping,loss)
num_to_str(ping,str_pi,5)
num_to_str(loss,str_lo,5)
pos += format(message[pos],2048 - pos,"%d.<font color=^"red^">%s</font> <font color=^"green^">%s</font>%s %s%s",i+1,name,steam?"[STEAM]":"",bot?"[BOT]":"",ip_showed?"IP:":"",ip_showed?ip:"")
pos += format(message[pos],2048 - pos," %s%s %s%s",steamid_showed?"STEAMID:":"",steamid_showed?steamid:"",time_showed?"TIME:":"",time_showed?str_pt:"")
pos += format(message[pos],2048 - pos," %s%s %s%s^n",ping_showed?"PING":"",ping_showed?str_pi:"",loss_showed?"LOSS:":"",loss_showed?str_lo:"")
}
show_motd(id,message,"Steames playerek")
return PLUGIN_HANDLED
}