Quote:
Originally Posted by DaSilva
Plugin has many bugs.
For example it shows the wrong number on players on the server...
|
That's average players number, not current ).
P.S I've fixed some code for say /showstats, that is my cmd_ShowStats function:
PHP Code:
public cmd_ShowStats(id,level,cid)
{
if(!cmd_access (id,level,cid,2)) return PLUGIN_HANDLED
new arg[16]
read_argv(1,arg,15)
if(containi(arg,"/showstats")!=-1) // A simple fix if the function was triggered via say
{
if (g_ShowStats[id]==1)
{
g_ShowStats[id] = 0
g_ShowStats[0]--
client_print(id,3,"[AMXX]Stats showing is now disabled")
}
else
{
g_ShowStats[id] = 1
g_ShowStats[0]++
client_print(id,3,"[AMXX]Stats showing is now enabled")
}
return PLUGIN_HANDLED
}
if(containi(arg,"on")!=-1 || containi(arg,"1")!=-1)
{
g_ShowStats[id] = 1
g_ShowStats[0]++
client_print(id,3,"[AMXX]Stats showing is now enabled")
}
if(containi(arg,"off")!=-1 || containi(arg,"0")!=-1)
{
g_ShowStats[id] = 0
g_ShowStats[0]--
client_print(id,3,"[AMXX]Stats showing is now disabled")
}
return PLUGIN_HANDLED
}