Raised This Month: $ Target: $400
 0% 

Problem with adding value to other value using concmd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 01-06-2013 , 09:19   Re: Problem with adding value to other value using concmd
Reply With Quote #2

Try this code

Code:
#include < amxmodx >
#include < amxmisc >
#include < dhudmessage >

new iCoins[ 33 ];

public plugin_init() 
{
	register_concmd( "kbm_give_points_easy", "CmdGivePoints" );
}

public CmdGivePoints( client )
{
	new szArgs[ 35 ];
	
	read_argv( 1, szArgs, charsmax( szArgs ) );
	
	new iPlayer = cmd_target( client, szArgs, CMDTARGET_NO_BOTS );
	
	if( iPlayer )
	{
		iCoins[ iPlayer ] += 20;
		
		set_dhudmessage( 0, 255, 0, -1.0, 0.69, 0, 6.0, 6.0 );
		
		show_dhudmessage( iPlayer, "You got 20 Points. (Total: %i)", iCoins[ iPlayer ] );
	}

	return 1;
}
__________________

Last edited by xDrugz; 01-06-2013 at 09:31.
xDrugz is offline
 



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


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