hello all, my friend tried to help me in public CmdMainJackpot( id )
but he dont know what the prob with
is not show the name of Winner in this line:
Code:
formatex(strTemp, charsmax(strTemp), "\y- \dLast Jackpot Winner: \r%s \w, \y %i \wCash.", data[ JACKPOT_NAME ], intJackpot ); // im not see the user name %s
Code:
public CmdMainJackpot( id )
{
static data[ enumJackpot ];
new strTemp[312], intLen;
new intJackpot = CmdGetJackpotCash();
//new intWinner = CmdGetWinner();
//ArrayGetArray( g_aJackpot, intWinner, data );
intLen = formatex( strTemp[ intLen ], charsmax( strTemp ) - intLen, "\r[AMXX] \wJailbreak \yJackPot \wMainMenu^n^n");
intLen += formatex( strTemp[ intLen ], charsmax( strTemp ) - intLen, "\y- \dCash deposited in the \yJackpot\w: \r%i^n", intJackpot);
intLen += formatex( strTemp[ intLen ], charsmax( strTemp ) - intLen, "\y- \dYou have deposited \r%i \dcash in the \yJackpot\w. \d(\y%.2f%% \rWin Chance\d)^n", g_arrayPlayer[ id ][ JACKPOT_CASHJACKPOT ], 100 * ( float( g_arrayPlayer[ id ][ JACKPOT_CASHJACKPOT ] ) / float( intJackpot )));
intLen += formatex( strTemp[ intLen ], charsmax( strTemp ) - intLen, "\y- \dTime Left: %s\w.", CmdGetJackpotTime());
new iMenu = menu_create(strTemp , "CmdHandlerMain");
menu_additem( iMenu, "What is the \yJackpot\w?");
menu_additem( iMenu, "Deposit cash in the \yJackpot\w.");
menu_additem( iMenu, "View Participants^n");
menu_additem( iMenu, "Server Manager's Menu^n", _, ADMIN_IMMUNITY)
// hope is work
formatex(strTemp, charsmax(strTemp), "\y- \dLast Jackpot Winner: \r%s \w, \y %i \wCash.", data[ ], intJackpot ); // im not see the user name %s
menu_addtext( iMenu, strTemp);
formatex(strTemp, charsmax(strTemp), "\y- \dHighest Jackpot Winner: \r%s \w, \y %i \wCash.", data[ JACKPOT_NAME ], intJackpot ); // im not see the user name %s
menu_addtext( iMenu, strTemp);
return menu_display( id, iMenu );
}
Problem Bugs:
the names not see in \r%s of winner
Code:
"\y- \dTime Left: %s\w.", CmdGetJackpotTime());
Not working properly, According to the times, while dropping too fast.
Code:
stock CmdGetJackpotTime()
{
new strDate[ 64 ];
new iHour, iMinute, iSecond;
time( iHour, iMinute, iSecond )
new intCheckT = iMinute;
intCheckT = 60 - ( ( intCheckT > 0 ) ? ( iMinute + 1) : iMinute );
formatex( strDate, charsmax( strDate ), "\r%i\y:\r%i", intCheckT, ( 60 - iSecond ));
return strDate;
}
__________________