Hey guys,
I'm having trouble with returning the server cvar mp_buytime to it's original settings after changing it in a special round.
This is how I have it set up in my plugin:
PHP Code:
public plugin_init()
{
register_logevent("roundend", 2, "1=Round_End")
old_buytime = get_cvar_num("mp_buytime")
}
public roundend()
{
server_cmd("mp_buytime %d",old_buytime);
}
The problem is it doesn't include the decimal points. If the server mp_buytime was set to 0.25 for example, it will reset it to 0 at round end. How would I do this correctly ?
Also is this the most efficient way of trying to prevent players from buying weapons? Basically i'm trying to make it a knife round, so players are stripped and given only a knife, then i'm trying to prevent them from being able to pick up weapons as well as not buy any weapons.
Cheers!