Raised This Month: $ Target: $400
 0% 

Infinite buytime?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-05-2013 , 23:00   Infinite buytime?
Reply With Quote #1

Whell, i know about Server Cvars unlocker plugin, but i find this code in forum:

PHP Code:
#include <amxmodx>
#include <fakemeta>

new const BUYTIME_CVAR[] = "mp_buytime"

#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "meTaLiCroSS"

public plugin_init() 
{
    
register_plugin("BuyTime Infinito"PLUGIN_VERSIONPLUGIN_AUTHOR)
    
    
register_forward(FM_CVarGetFloat"fw_CVarGetFloat")
}

public 
fw_CVarGetFloat(const szCVar[])
{
    if(
equal(szCVarBUYTIME_CVAR))
    {
        
forward_return(FMV_FLOAT99999.0)
        return 
FMRES_SUPERCEDE
    
}
    
    return 
FMRES_IGNORED

And its based on this (player.cpp i think):

PHP Code:
int buyTime = ( int )CVAR_GET_FLOAT"mp_buytime" ) * 60;

    if( 
buyTime 15 )
    {
        
buyTime 15;
        
CVAR_SET_FLOAT"mp_buytime"/ ( 60 15 ) );
    }

    if( 
gpGlobals->time g_pGameRules->m_fRoundCount buyTime )
    {
        if( 
display )
            
ClientPrintpevHUD_PRINTCENTER"#Cant_buy"UTIL_dtos1buyTime ) );

        return 
false;
    } 
This will always return true when i set the buyTime to 99999.0 ??
Or it is same to set the mp_buytime var to 99999.0 ??

Anyway, has an method to set the buytime as infinite??
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



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 23:22.


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