This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

menu glitched


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 06-06-2018 , 16:06   menu glitched
Reply With Quote #1

hello all, my friend tried to help me in public CmdMainJackpot( id )

but he dont know what the prob with
Code:
JACKPOT_NAME[ 33 ]
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;
}
__________________
Қазақстан Республикасы

Last edited by Snitch; 06-06-2018 at 16:08.
Snitch is offline
Send a message via Skype™ to Snitch
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 06-07-2018 , 11:46   Re: menu glitched
Reply With Quote #2

I already tried to see what the prob in data [ name ]....

Bump
__________________
Қазақстан Республикасы

Last edited by Snitch; 06-07-2018 at 11:50.
Snitch is offline
Send a message via Skype™ to Snitch
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 08:39.


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