Raised This Month: $ Target: $400
 0% 

[CS:GO] Setting money ( the only way possible )


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 04-03-2019 , 09:17   Re: [CS:GO] Setting money ( the only way possible )
Reply With Quote #8

Quote:
Originally Posted by eyal282 View Post
Stock is now better.
That should be faster, because why use checking the FindEntityByClassname when it faster to create new and delete it
PHP Code:
stock SetClientMoney(clientmoney)
{
    
SetEntProp(clientProp_Send"m_iAccount"money);

    
int entity CreateEntityByName("game_money");
    if(
entity != INVALID_ENT_REFERENCE)
    {
        
DispatchKeyValue(entity"AwardText""");
    
        
DispatchSpawn(entity);

        
SetVariantInt(0);
        
AcceptEntityInput(entity"SetMoneyAmount");
        
        
SetVariantInt(client);
        
AcceptEntityInput(entity"AddMoneyPlayer");
        
        
AcceptEntityInput(entity"Kill");
        
        return 
true;
    }

    return 
false;

and i never had issue with giving money by the
Quote:
/**
* @brief Sets the money on a client.
*
* @param clientIndex The client index.
* @param iMoney The money amount.
**/
void AccountSetMoney(int clientIndex, int iMoney)
{
SetEntData(clientIndex, g_iOffset_PlayerAccount, iMoney, _, true);
}
__________________

Last edited by gubka; 04-03-2019 at 09:19.
gubka is offline
Send a message via ICQ to gubka
 


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


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