Raised This Month: $ Target: $400
 0% 

Return mp_buytime to server settings


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
winds
Member
Join Date: Aug 2010
Old 11-10-2011 , 17:45   Return mp_buytime to server settings
Reply With Quote #1

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!
winds is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode