Quote:
|
and I want to be the uptime since the bot was created..
|
Well...
You have to start timer, when player joins. That's all I think...
Define get_gametime, when player joins and then check time played by defined gametime - current gametime.
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new Float: gametime[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /time", "cmd_timer");
}
public player_connect(id)
{
gametime[id] = get_gametime ( )
}
public cmd_timer(id)
{
new Float: szSec[33]
szSec[id] = (get_gametime ( ) - gametime[id])
client_print(id,print_chat, "You're playing already for %s seconds", szSec[id])
}
public player_disconnect(id)
{
gametime[id] = 0.00
}
I haven't test it, but it compiles.