AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [ Help ] Conditions and time. (https://forums.alliedmods.net/showthread.php?t=308095)

Fuck For Fun 06-06-2018 11:27

[ Help ] Conditions and time.
 
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?

^SmileY 06-06-2018 11:29

Re: [ Help ] Conditions and time.
 
Try it wihout ColorChat to see the result

Fuck For Fun 06-06-2018 12:16

Re: [ Help ] Conditions and time.
 
Quote:

Originally Posted by ^SmileY (Post 2595584)
Try it wihout ColorChat to see the result

thanks the prob was with %d i change it to
>
Code:

%i

edon1337 06-06-2018 16:01

Re: [ Help ] Conditions and time.
 
Quote:

Originally Posted by Fuck For Fun (Post 2595590)
thanks the prob was with %d i change it to
>
Code:

%i

%i and %d both are the same.

^SmileY 06-06-2018 17:00

Re: [ Help ] Conditions and time.
 
Quote:

Originally Posted by edon1337 (Post 2595613)
%i and %d both are the same.

Not on his custom include :)


All times are GMT -4. The time now is 04:36.

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