Raised This Month: $ Target: $400
 0% 

[HELP] Problem with Round Money plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-05-2015 , 02:49   [HELP] Problem with Round Money plugin
Reply With Quote #1

Hello,
I created a plugin called "RoundMoneY" but it's not giving me money..

Here's it..

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "RoundMoney"
#define VERSION "1.0"
#define AUTHOR "Striker"

new MONEY;

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_dictionary("RoundMoneY.txt")
    
    register_logevent("Round_Money", 2, "16000")
}

public Round_Money (id) {
    new players[32], playerCount, player, i, pMoney;
    pMoney = get_pcvar_num(MONEY)
    
    get_players(players, playerCount);
    
    for(i=0; i < playerCount; i++) {
        player = players[i];
        
        if(cs_get_user_money(player) < pMoney) {
            cs_set_user_money(player, pMoney);
            client_print(player, print_chat, "%L", MONEY, "AMOUNT_OF_MONEY", pMoney)
        }
    }
}
It's not giving 16000 money..What is wrong.?
Please help me.

Thank You.
VarmaRitik is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 02-05-2015 , 06:12   Re: [HELP] Problem with Round Money plugin
Reply With Quote #2

What exactly are you trying to achieve?
RateX is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 02-05-2015 , 07:19   Re: [HELP] Problem with Round Money plugin
Reply With Quote #3

First You Forget register_cvar....
And You need to change
Quote:
register_logevent("Round_Money", 2, "16000")
to
Quote:
register_logevent("Round_Money", 2, "1=Round_Start")
for give money in start of round

--
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "RoundMoney"
#define VERSION "1.0"
#define AUTHOR "Striker"

new MONEY;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_dictionary("RoundMoneY.txt")
    
    
MONEY register_cvar("amx_money","16000")
    
    
register_logevent("Round_Money"2"1=Round_Start")
}

public 
Round_Money (id) {
    new 
players[32], playerCountplayeripMoney;
    
pMoney get_pcvar_num(MONEY)
    
    
get_players(playersplayerCount);
    
    for(
i=0playerCounti++) {
        
player players[i];
        
        if(
cs_get_user_money(player) < pMoney) {
            
cs_set_user_money(playerpMoney);
            
client_print(playerprint_chat"%L"MONEY"AMOUNT_OF_MONEY"pMoney)
        }
    }

__________________

Last edited by Eagle07; 02-05-2015 at 07:19.
Eagle07 is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-05-2015 , 08:33   Re: [HELP] Problem with Round Money plugin
Reply With Quote #4

Thank You so much..
VarmaRitik is offline
Reply



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 01:14.


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