Raised This Month: $ Target: $400
 0% 

ChipMod ( private ) HELP PLS :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 03-31-2011 , 10:48   ChipMod ( private ) HELP PLS :)
Reply With Quote #1

Hey guys.. I've made this ChipMod for JumpGround servers, and i want to set the users Chips, in Money Bar ( normal show money there )

i know how to make it, but it set it back at all round starts?

ill use

PHP Code:
public CmdSetMoney iPlayer )
{
             new 
chips iPlayerChips iPlayer ]
             
cs_set_user_money iPlayerchips)

but its not working ?

and in eventNewRound, ill use

PHP Code:
public eventNewRound iPlayer )
{
set_task 2.0"CmdSetMoney"iPlayer )

what is wrong ? :s
__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!
HBxander is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-31-2011 , 10:57   Re: ChipMod ( private ) HELP PLS :)
Reply With Quote #2

Round start functions don't have a user id argument. Instead, you need to loop through all player ID's and set task for each one. Like so:

PHP Code:
public plugin_init() 
{
    
register_event"HLTV""eventNewRound""a""1=0""2=0" );
}

public 
eventNewRound()
{
    new 
players32 ], playernum;
    
get_playersplayersnum );
    
    for( new 
num ++ )
    {
        
player players];
        if( 
is_user_aliveplayer ) )
            
set_task 2.0"CmdSetMoney"player );
    }

hornet is offline
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 03-31-2011 , 10:58   Re: ChipMod ( private ) HELP PLS :)
Reply With Quote #3

+1 for helping :-)

Was just wondering why it didnt work but yea. xD

Ty :-)

I started scripting for about 2 months ago, so i have to pracc it alot bfore i can go make my own plugins 100% non buggy xD

its working and just try join us on our server - ill give +1k chips for helping :-)

IP : 178.236.68.147:27015

__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!

Last edited by HBxander; 03-31-2011 at 11:01.
HBxander is offline
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 03-31-2011 , 11:03   Re: ChipMod ( private ) HELP PLS :)
Reply With Quote #4

can i make an AutoUpdater for it ? so i dont have to make the CmdUpdateMoney ( iPlayer )
after all the time i get / lose chips ? :b

like
command for if it changes value then update cs_set_user_money ( iPlayer, chips, 1 )
?
__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!
HBxander is offline
Old 03-31-2011, 11:04
HBxander
This message has been deleted by HBxander.
matsi
Thinkosaur
Join Date: Sep 2006
Old 03-31-2011 , 12:16   Re: ChipMod ( private ) HELP PLS :)
Reply With Quote #5

Code:
register_message( get_user_msgid( "Money" ), "MessageMoney" ); ... public MessageMoney( iMsgId, iDest, iPlayer ) {         // update chips? ;o }
matsi is offline
Reply


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:40.


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