LVA problems for odd reasons
#5

Code:
  			else if ( pData[ playerid ][ P_ACTIVITY ] == _:G_BANK_DEPOSIT )
  			{
  			  if ( !IsPlayerInAnyGang( playerid ) )
						return ShowBankMenu( playerid );
						
				if ( gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK ] < GANG_BANK_LIMIT )
				{
				  if ( ( mMoney + gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK ] ) > GANG_BANK_LIMIT )
				    mMoney = ( GANG_BANK_LIMIT - gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK ] );
				}
				else
					return ShowBankMenu(playerid);
			}

			switch ( pData[ playerid ][ P_ACTIVITY ] )
			{
				case P_BANK_DEPOSIT :
				{
					if ( pMoney >= mMoney )
					{
						pData[ playerid ][ P_BANK ] += mMoney;
						AC_GivePlayerMoney( playerid, -mMoney );
						ShowMenuForPlayer( mBank[ e_BANK_MENU_MONEY_TABLE ], playerid );
						
						c = 1;
					}
				}
				case P_BANK_WITHDRAW:
				{
					if ( pData[ playerid ][ P_BANK ] >= mMoney )
					{
						pData[ playerid ][ P_BANK ] -= mMoney;
						AC_GivePlayerMoney( playerid, mMoney );
						ShowMenuForPlayer( mBank[ e_BANK_MENU_MONEY_TABLE ], playerid );
						
						c = 1;
					}
				}
				case G_BANK_DEPOSIT:
				{
				  if ( !IsPlayerInAnyGang( playerid ) )
				  {
						ShowBankMenu( playerid );
				    return 0;
					}
				    
				  if ( pMoney >= mMoney )
				  {
				    gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK ] += mMoney;
						AC_GivePlayerMoney( playerid, -mMoney );
						ShowMenuForPlayer( mBank[ e_BANK_MENU_MONEY_TABLE ], playerid );
						
						c = 2;
					}
				}

				case G_BANK_WITHDRAW:
				{
				  if ( !IsPlayerInAnyGang( playerid ) )
				  {
						ShowBankMenu( playerid );
				    return 0;
					}
				    
          if ( gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK ] >= mMoney )
				  {
				    gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK ] -= mMoney;
						AC_GivePlayerMoney( playerid, mMoney );
						ShowMenuForPlayer( mBank[ e_BANK_MENU_MONEY_TABLE ], playerid );
						
						c = 2;
					}
				}
			}
			ShowMenuForPlayer( mBank[ e_BANK_MENU_MONEY_TABLE ], playerid );
		}
	}
	
	if ( c == 1 )
	{
		pData[ playerid ][ P_BANK_TEXT ] = CreateBankText( playerid );
	}

	if ( c == 2 && IsPlayerInAnyGang( playerid ) )
	{
		gData[ pData[ playerid ][ P_GANG_ID ] ][ G_BANK_TEXT ] = CreateGangBankText( pData[ playerid ][ P_GANG_ID ] );
	}
	
	return 1;
}

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	End Of Include: menu.inc, Simon Campbell
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
excuse the double post

and im sure i got the includes i think im gonna paste bin the whole of it for you guys to see 1 sec
Reply


Messages In This Thread
LVA problems for odd reasons - by Turricane - 20.06.2009, 10:38
Re: LVA problems for odd reasons - by joeri55 - 20.06.2009, 10:47
Re: LVA problems for odd reasons - by Turricane - 20.06.2009, 10:50
Re: LVA problems for odd reasons - by *ToM* - 20.06.2009, 10:52
Re: LVA problems for odd reasons - by Turricane - 20.06.2009, 10:53
Re: LVA problems for odd reasons - by *ToM* - 20.06.2009, 11:00
Re: LVA problems for odd reasons - by Turricane - 20.06.2009, 11:00
Re: LVA problems for odd reasons - by *ToM* - 20.06.2009, 11:21

Forum Jump:


Users browsing this thread: 1 Guest(s)