crowdfunding darken list items
This commit is contained in:
parent
303c7ce698
commit
5e938dc4ba
@ -2530,8 +2530,8 @@ static const
|
|||||||
g_slotOddsPayout[ ] [ E_SLOT_ODD_DATA ] =
|
g_slotOddsPayout[ ] [ E_SLOT_ODD_DATA ] =
|
||||||
{
|
{
|
||||||
// Entry Fee Probability Tax {Double Brick} {Single Brick} {Gold Bells} {Cherry} {Grapes} {69} Payouts (Single brick, gold bells, etc...)
|
// Entry Fee Probability Tax {Double Brick} {Single Brick} {Gold Bells} {Cherry} {Grapes} {69} Payouts (Single brick, gold bells, etc...)
|
||||||
{ 50000, 50000, 0.2, -1, { 1, 400 }, { 401, 1199}, { 1200, 2797 }, { 2798, 10787 }, { 10788, 26767 }, { 1000000, 500000, 250000, 50000, 25000 } },
|
{ 50000, 50000, 0.2, 48032, { 1, 400 }, { 401, 1199}, { 1200, 2797 }, { 2798, 10787 }, { 10788, 26767 }, { 1000000, 500000, 250000, 50000, 25000 } },
|
||||||
{ 25000, 100000, 0.2, -1, { 1, 799 }, { 800, 2397 }, { 2398, 6392 }, { 6393, 22372 }, { 22373, 54332 }, { 500000, 250000, 100000, 25000, 12500 } },
|
{ 25000, 100000, 0.2, 98742, { 1, 799 }, { 800, 2397 }, { 2398, 6392 }, { 6393, 22372 }, { 22373, 54332 }, { 500000, 250000, 100000, 25000, 12500 } },
|
||||||
{ 10000, 62500, 0.2, 62488, { 1, 994 }, { 995, 2982 }, { 2983, 6957 }, { 6958, 16895 }, { 16896, 36770 }, { 100000, 50000, 25000, 10000, 5000 } },
|
{ 10000, 62500, 0.2, 62488, { 1, 994 }, { 995, 2982 }, { 2983, 6957 }, { 6958, 16895 }, { 16896, 36770 }, { 100000, 50000, 25000, 10000, 5000 } },
|
||||||
{ 5000, 40000, 0.25, 27390, { 1, 596 }, { 597, 1788 }, { 1789, 4768 }, { 4769, 10728 }, { 10729, 22648 }, { 50000, 25000, 10000, 5000, 2500 } }
|
{ 5000, 40000, 0.25, 27390, { 1, 596 }, { 597, 1788 }, { 1789, 4768 }, { 4769, 10728 }, { 10729, 22648 }, { 50000, 25000, 10000, 5000, 2500 } }
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,10 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
new
|
new
|
||||||
viewing_crowdfund = GetPVarInt( playerid, "viewing_crowdfund" );
|
viewing_crowdfund = GetPVarInt( playerid, "viewing_crowdfund" );
|
||||||
|
|
||||||
|
if ( ! viewing_crowdfund ) {
|
||||||
|
return SendError( playerid, "There was an error. Please attempt to contribute to the crowdfund again." );
|
||||||
|
}
|
||||||
|
|
||||||
switch ( listitem )
|
switch ( listitem )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -107,9 +111,8 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ** Commands ** */
|
/* ** Commands ** */
|
||||||
CMD:crowdfunds( playerid, params[ ] ) {
|
CMD:crowdfund( playerid, params[ ] ) return cmd_crowdfunds( playerid, params );
|
||||||
return ShowPlayerCrowdfunds( playerid );
|
CMD:crowdfunds( playerid, params[ ] ) return ShowPlayerCrowdfunds( playerid );
|
||||||
}
|
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
stock ShowPlayerCrowdfunds( playerid ) {
|
stock ShowPlayerCrowdfunds( playerid ) {
|
||||||
@ -264,16 +267,27 @@ thread OnDisplayCrowdfunds( playerid )
|
|||||||
new release_timestamp = cache_get_field_content_int( row, "RELEASE", dbHandle );
|
new release_timestamp = cache_get_field_content_int( row, "RELEASE", dbHandle );
|
||||||
new end_timestamp = cache_get_field_content_int( row, "END", dbHandle );
|
new end_timestamp = cache_get_field_content_int( row, "END", dbHandle );
|
||||||
|
|
||||||
format( szLargeString, sizeof( szLargeString ),
|
// inactive
|
||||||
"%s%s%s\t%s IC\t%s IC\t%s%0.1f%\n",
|
if ( ( curr_timestamp > release_timestamp && release_timestamp != 0 ) || ( curr_timestamp > end_timestamp ) )
|
||||||
szLargeString,
|
{
|
||||||
( curr_timestamp > release_timestamp && release_timestamp != 0 ) || ( curr_timestamp > end_timestamp ) ? ( COL_GREY ) : ( COL_WHITE ),
|
format( szLargeString, sizeof( szLargeString ),
|
||||||
feature,
|
"%s{333333}%s\t{333333}%s IC\t{333333}%s IC\t%s%0.1f%\n",
|
||||||
number_format( amount_raised, .prefix = '\0', .decimals = 1 ),
|
szLargeString, feature,
|
||||||
number_format( target_amount, .prefix = '\0', .decimals = 1 ),
|
number_format( amount_raised, .prefix = '\0', .decimals = 1 ),
|
||||||
percent_raised >= 100.0 ? ( COL_GREEN ) : ( COL_WHITE ),
|
number_format( target_amount, .prefix = '\0', .decimals = 1 ),
|
||||||
percent_raised
|
percent_raised >= 100.0 ? ( COL_GREEN ) : ( COL_WHITE ), percent_raised
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
format( szLargeString, sizeof( szLargeString ),
|
||||||
|
"%s%s\t%s IC\t%s IC\t%s%0.1f%\n",
|
||||||
|
szLargeString, feature,
|
||||||
|
number_format( amount_raised, .prefix = '\0', .decimals = 1 ),
|
||||||
|
number_format( target_amount, .prefix = '\0', .decimals = 1 ),
|
||||||
|
percent_raised >= 100.0 ? ( COL_GREEN ) : ( COL_WHITE ), percent_raised
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
format( crowdfund_ids, sizeof( crowdfund_ids ), "%s%d ", crowdfund_ids, id );
|
format( crowdfund_ids, sizeof( crowdfund_ids ), "%s%d ", crowdfund_ids, id );
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
|
|
||||||
/* ** Debug ** */
|
/* ** Debug ** */
|
||||||
|
|
||||||
// Added class detection for civilains - ShowPlayerDuelMenu(playerid)
|
|
||||||
|
|
||||||
|
|
||||||
// #define GivePlayerCash GivePlayerMoney
|
|
||||||
// #define GetPlayerCash GetPlayerMoney
|
|
||||||
|
|
||||||
/* ** Definitions ** */
|
/* ** Definitions ** */
|
||||||
#define COL_DUEL "{B74AFF}"
|
#define COL_DUEL "{B74AFF}"
|
||||||
#define DIALOG_DUEL 7360
|
#define DIALOG_DUEL 7360
|
||||||
|
Loading…
Reference in New Issue
Block a user