Raised This Month: $ Target: $400
 0% 

Solved [ Help ] Conditions and time.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-06-2018 , 11:27   [ Help ] Conditions and time.
Reply With Quote #1

I try to do an ad when a player tries to put on Deposit amount below 2500 $, but it shows incorrectly
Code:
enum _:enumCvar
{
	CVAR_DEPOSIT
}

new g_aCvar[ enumCvar ];
Code:
g_aCvar[ CVAR_DEPOSIT ] = register_cvar( "jp_deposit_min", "2500" );
Code:
	new intDeposit = Amount;
	new intMin = get_pcvar_num( g_aCvar[ CVAR_DEPOSIT ] );
	
	if( intDeposit < intMin )
	{
		ColorChat( id, "Your cash is not enough to deposit to ^3jackpot ^4[^1%d^3/^1%d^4]^1.", intMin - intDeposit, 2500);
		return PLUGIN_HANDLED;
	}
IN-Game is shown:
Code:
[AMXX] Your cash is not enough to deposit to jackpot [65/2500].
what the prob with %d/%d [65/2500] = what is 65?

Last edited by Fuck For Fun; 06-06-2018 at 16:13.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-06-2018 , 11:29   Re: [ Help ] Conditions and time.
Reply With Quote #2

Try it wihout ColorChat to see the result
__________________
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
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-06-2018 , 12:16   Re: [ Help ] Conditions and time.
Reply With Quote #3

Quote:
Originally Posted by ^SmileY View Post
Try it wihout ColorChat to see the result
thanks the prob was with %d i change it to
>
Code:
%i
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-06-2018 , 16:01   Re: [ Help ] Conditions and time.
Reply With Quote #4

Quote:
Originally Posted by Fuck For Fun View Post
thanks the prob was with %d i change it to
>
Code:
%i
%i and %d both are the same.
__________________
edon1337 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-06-2018 , 17:00   Re: [ Help ] Conditions and time.
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
%i and %d both are the same.
Not on his custom include
__________________
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
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 04:36.


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